-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2085 from numbbo/release
To be released as v2.6
- Loading branch information
Showing
72 changed files
with
7,041 additions
and
2,344 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: CMake | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
pull_request: | ||
branches: [ master, development ] | ||
|
||
env: | ||
BUILD_TYPE: Release | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Build C amalgamation | ||
run: python ${{github.workspace}}/do.py build-c | ||
|
||
- name: Configure CMake | ||
run: cmake -S ${{github.workspace}}/code-experiments/build/c/ -B ${{github.workspace}}/code-experiments/build/c/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | ||
|
||
- name: Build | ||
run: cmake --build ${{github.workspace}}/code-experiments/build/c/build --config ${{env.BUILD_TYPE}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
cmake_minimum_required(VERSION 3.19) | ||
project(ExampleExperiment | ||
DESCRIPTION "Example COCO experiment" | ||
LANGUAGES C) | ||
|
||
find_library(MATH_LIBRARY m) | ||
|
||
include(CheckCompilerFlag) | ||
check_compiler_flag(C "-pedantic -Wall -Wextra -Wstrict-prototypes -Wshadow -Wno-sign-compare -Wconversion" CC_HAS_WALL_ETC) | ||
|
||
add_library(coco STATIC coco.c coco.h) | ||
target_include_directories(coco PUBLIC .) | ||
if(MATH_LIBRARY) | ||
target_link_libraries(coco PUBLIC ${MATH_LIBRARY}) | ||
endif() | ||
# Add warning flags | ||
if (MSVC) | ||
target_compile_options(coco PRIVATE "/W3") | ||
elseif (CC_HAS_WALL_ETC) | ||
target_compile_options(coco PRIVATE -pedantic -Wall -Wextra -Wstrict-prototypes -Wshadow -Wno-sign-compare -Wconversion) | ||
endif() | ||
|
||
add_executable(example_experiment example_experiment.c) | ||
target_link_libraries(example_experiment PUBLIC coco) | ||
if(MATH_LIBRARY) | ||
target_link_libraries(example_experiment PUBLIC ${MATH_LIBRARY}) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
project('example_experiment', 'c', | ||
default_options: ['warning_level=3', 'buildtype=release'] | ||
) | ||
|
||
cc = meson.get_compiler('c') | ||
m_dep = cc.find_library('m', required : false) | ||
|
||
coco_lib = static_library('coco', | ||
sources: 'coco.c', | ||
dependencies: m_dep | ||
) | ||
|
||
executable('example_experiment', | ||
sources: 'example_experiment.c', | ||
link_with: coco_lib, | ||
dependencies: m_dep | ||
) | ||
|
Oops, something went wrong.