Moved the definition of AC_DEFAULT_CONFIG to the root-level CMakeLists.txt. Now should be visible throughout the project.
This commit is contained in:
@@ -85,6 +85,8 @@ else ()
|
||||
add_definitions(-DAC_DOUBLE_PRECISION=0)
|
||||
endif ()
|
||||
|
||||
add_definitions(-DAC_DEFAULT_CONFIG="${CMAKE_SOURCE_DIR}/config/astaroth.conf")
|
||||
|
||||
## Include directories
|
||||
include_directories(.)
|
||||
include_directories(include)
|
||||
|
@@ -22,7 +22,7 @@ endif ()
|
||||
|
||||
## Compilation flags
|
||||
add_compile_options(-pipe ${OpenMP_CXX_FLAGS})
|
||||
add_compile_options(-Wall -Wextra -Werror -Wdouble-promotion -Wfloat-conversion)# -Wshadow)
|
||||
add_compile_options(-Wall -Wextra -Werror -Wdouble-promotion -Wfloat-conversion -Wshadow)
|
||||
|
||||
## Compile and link
|
||||
add_library(astaroth_standalone STATIC ${SOURCES})
|
||||
@@ -30,4 +30,3 @@ target_link_libraries(astaroth_standalone PRIVATE astaroth_core "${OpenMP_CXX_FL
|
||||
|
||||
add_executable(ac_run main.cc)
|
||||
target_link_libraries(ac_run PRIVATE astaroth_standalone)
|
||||
add_definitions(-DAC_DEFAULT_CONFIG="${CMAKE_SOURCE_DIR}/config/astaroth.conf")
|
||||
|
@@ -8,4 +8,3 @@ add_compile_options(-Wall -Wextra -Werror -Wdouble-promotion -Wfloat-conversion
|
||||
## Compile
|
||||
add_library(astaroth_utils STATIC config_loader.c memory.c verification.c)
|
||||
target_link_libraries(astaroth_utils PRIVATE astaroth_core m)
|
||||
target_compile_definitions(astaroth_utils PUBLIC -DAC_DEFAULT_CONFIG="${CMAKE_SOURCE_DIR}/config/astaroth.conf")
|
||||
|
Reference in New Issue
Block a user