From 6e634111706fe6f8cbecde0ba207def80a43842b Mon Sep 17 00:00:00 2001 From: jpekkila Date: Tue, 3 Dec 2019 18:42:49 +0200 Subject: [PATCH] Moved the definition of AC_DEFAULT_CONFIG to the root-level CMakeLists.txt. Now should be visible throughout the project. --- CMakeLists.txt | 2 ++ src/standalone/CMakeLists.txt | 3 +-- src/utils/CMakeLists.txt | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 04b6077..0d67688 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/src/standalone/CMakeLists.txt b/src/standalone/CMakeLists.txt index b49ba98..327ddcf 100644 --- a/src/standalone/CMakeLists.txt +++ b/src/standalone/CMakeLists.txt @@ -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") diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt index 6fe4adc..dc34a83 100644 --- a/src/utils/CMakeLists.txt +++ b/src/utils/CMakeLists.txt @@ -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")