20 lines
601 B
CMake
20 lines
601 B
CMake
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
|
|
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin/examples)
|
|
|
|
macro(add_example name switch)
|
|
if(${switch})
|
|
add_executable(${name} ${name}.cpp)
|
|
set_target_properties(${name} PROPERTIES CXX_STANDARD 17 CXX_STANDARD_REQUIRED ON)
|
|
target_link_libraries(${name} PRIVATE ${GCTL_LIB})
|
|
target_link_libraries(${name} PRIVATE gctl_optimization)
|
|
endif()
|
|
endmacro()
|
|
|
|
add_example(ex1 ON)
|
|
add_example(ex2 ON)
|
|
add_example(ex3 ON)
|
|
add_example(ex4 ON)
|
|
add_example(ex5 ON)
|
|
add_example(ex6 ON)
|
|
add_example(ex7 ON)
|
|
add_example(ex8 ON) |