Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated build system #484

Merged
merged 2 commits into from
Dec 9, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,14 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "(Clang|GNU|Intel)")

# Add a build type that keeps runtime checks enabled
set(CMAKE_CXX_FLAGS_RELWITHASSERT
"-O3"
"-O2"
CACHE INTERNAL "Flags used by the compiler during release builds containing runtime checks.")

# Add a build type that keeps runtime checks enabled
set(CMAKE_CXX_FLAGS_RELEASE
"-O2"
CACHE INTERNAL "Flags used by the compiler during release builds.")

# The default value is often an empty string, but this is usually not desirable and one of the other standard build
# types is usually more appropriate.
if(NOT CMAKE_BUILD_TYPE)
Expand Down Expand Up @@ -227,18 +232,15 @@ if(NOT (TARGET magic_enum))
endif()

# include exprtk header-only libraries available as a statically linked library to simplify/speed-up builds
include_directories("${CMAKE_SOURCE_DIR}/third_party")
include_directories("${CMAKE_SOURCE_DIR}/third_party/exprtk")
add_library(exprtk STATIC
"${CMAKE_SOURCE_DIR}/third_party/exprtk.cpp" # dummy source file
"${CMAKE_SOURCE_DIR}/third_party/exprtk.hpp"
"${CMAKE_CURRENT_SOURCE_DIR}/third_party/exprtk.hpp"
"${CMAKE_CURRENT_SOURCE_DIR}/third_party/exprtk.cpp" # dummy source file
)
target_sources(exprtk PRIVATE "${CMAKE_SOURCE_DIR}/third_party/exprtk.hpp")
target_include_directories(exprtk PUBLIC
"${CMAKE_SOURCE_DIR}/third_party"
"${CMAKE_SOURCE_DIR}/third_party/exprtk"
"${CMAKE_CURRENT_SOURCE_DIR}/third_party"
"${CMAKE_CURRENT_SOURCE_DIR}/third_party/exprtk"
)
target_compile_options(exprtk PRIVATE -O3)
target_compile_options(exprtk PRIVATE -O1)
# include exprtk header-only - END

include(FetchContent)
Expand All @@ -250,7 +252,8 @@ FetchContent_Declare(
FetchContent_Declare(
pmt
GIT_REPOSITORY https://github.com/gnuradio/pmt.git
GIT_TAG main)
GIT_TAG e1a46cb61decb044f6ab0a58a77211beb3630340 # latest as of 2023-12-06
)

FetchContent_Declare(
ut
Expand Down
Loading