-
Notifications
You must be signed in to change notification settings - Fork 7
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 #6 from JPenuchot/dev
CMake overhaul
- Loading branch information
Showing
16 changed files
with
129 additions
and
199 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
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,38 +1,31 @@ | ||
# Creating the grapher library | ||
# Declaring the grapher library | ||
|
||
file(GLOB_RECURSE GRAPHER_SOURCES lib/*.cpp) | ||
add_library(grapher STATIC ${GRAPHER_SOURCES}) | ||
target_include_directories(grapher PUBLIC include) | ||
|
||
if(CTBENCH_FETCH_LIBRARIES) | ||
include(cmake/libraries_fetch.cmake) | ||
else() | ||
include(cmake/libraries_local.cmake) | ||
endif() | ||
|
||
# LLVM | ||
find_package(nlohmann_json 3.9.1 REQUIRED) | ||
find_package(sciplot REQUIRED) | ||
find_package(LLVM REQUIRED CONFIG) | ||
|
||
llvm_map_components_to_libnames(llvm_libs core support) | ||
#target_compile_options(grapher PUBLIC -fno-rtti) | ||
target_link_libraries(grapher PUBLIC ${llvm_libs}) | ||
|
||
target_compile_options( | ||
grapher | ||
PUBLIC -Wall | ||
-Wextra | ||
-Werror | ||
-Wnull-dereference | ||
-Wold-style-cast | ||
-Wdouble-promotion | ||
-Wshadow) | ||
|
||
# Old libstdc++ compatibility | ||
target_link_libraries(grapher PUBLIC stdc++fs) | ||
target_link_libraries(grapher PUBLIC tbb) | ||
|
||
# Adding executable subdirectories | ||
add_subdirectory(grapher-plot) | ||
add_subdirectory(grapher-utils) | ||
|
||
if(CTBENCH_ENABLE_TESTING) | ||
|
||
target_link_libraries(grapher PUBLIC nlohmann_json::nlohmann_json | ||
sciplot::sciplot stdc++fs tbb ${llvm_libs}) | ||
|
||
target_compile_options(grapher PUBLIC -fno-rtti -fno-exceptions) | ||
|
||
# Adding executables | ||
|
||
add_executable(ctbench-grapher-plot grapher-plot.cpp) | ||
target_link_libraries(ctbench-grapher-plot PRIVATE grapher) | ||
|
||
add_executable(ctbench-grapher-utils grapher-utils.cpp) | ||
target_link_libraries(ctbench-grapher-utils PRIVATE grapher) | ||
|
||
install(TARGETS ctbench-grapher-plot ctbench-grapher-utils | ||
EXPORT ctbench-targets) | ||
|
||
if(BUILD_TESTING) | ||
add_subdirectory(tests) | ||
endif() |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.