-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move find dependencies to cmake directory
- Loading branch information
Showing
16 changed files
with
130 additions
and
49 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Fail if someone tries to config an in-source build. | ||
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") | ||
message(FATAL_ERROR "In-source builds are not supported. Please remove " | ||
"CMakeCache.txt from the 'src' dir and configure an " | ||
"out-of-source build in another directory.") | ||
endif() | ||
|
||
# Always use position independent code | ||
set(CMAKE_POSITION_INDEPENDENT_CODE ON) | ||
|
||
# Set build type | ||
set(default_build_type "Debug") | ||
|
||
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) | ||
message(STATUS "Using default build type: \"${default_build_type}\"") | ||
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE | ||
STRING "Choose the type of build." FORCE) | ||
# Set the possible values of build type for cmake-gui | ||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" | ||
"RelWithDebInfo") | ||
else() | ||
message(STATUS "Setting build type to \"${CMAKE_BUILD_TYPE}\"") | ||
endif() |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
include(cmake/thirdparty/FindBison.cmake) | ||
|
||
if(PERFFLOWASPECT_WITH_CUDA) | ||
include(cmake/thirdparty/FindCUDA.cmake) | ||
endif() | ||
|
||
include(cmake/thirdparty/FindFlex.cmake) | ||
|
||
include(cmake/thirdparty/FindJansson.cmake) | ||
|
||
include(cmake/thirdparty/FindLLVM.cmake) | ||
|
||
if(PERFFLOWASPECT_WITH_MPI) | ||
include(cmake/thirdparty/FindMPI.cmake) | ||
endif() | ||
|
||
include(cmake/thirdparty/FindOpenSSL.cmake) | ||
|
||
if(PERFFLOWASPECT_WITH_MULTITHREADS) | ||
include(cmake/thirdparty/FindThreads.cmake) | ||
endif() |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
find_package(BISON REQUIRED) |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
find_package(CUDA) |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
find_package(FLEX REQUIRED) |
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# First check for user-specified JANSSON_DIR | ||
if(JANSSON_DIR) | ||
message(STATUS "Looking for Jansson using JANSSON_DIR = ${JANSSON_DIR}") | ||
|
||
find_path(JANSSON_INCLUDE_DIRS | ||
NAMES jansson.h | ||
HINTS ${JANSSON_DIR}/include | ||
) | ||
if(NOT JANSSON_INCLUDE_DIRS) | ||
MESSAGE(FATAL_ERROR "Could not find jansson.h in ${JANSSON_DIR}/include") | ||
endif() | ||
|
||
find_library(JANSSON_LIBRARY | ||
NAMES libjansson.so | ||
HINTS ${JANSSON_DIR}/lib | ||
) | ||
if(NOT JANSSON_LIBRARY) | ||
MESSAGE(FATAL_ERROR "Could not find libjansson.so in ${JANSSON_DIR}/lib") | ||
endif() | ||
|
||
set(JANSSON_FOUND TRUE CACHE INTERNAL "") | ||
set(JANSSON_DIR ${JANSSON_DIR} CACHE PATH "" FORCE) | ||
include_directories(${JANSSON_INCLUDE_DIRS}) | ||
|
||
message(STATUS "FOUND jansson") | ||
message(STATUS " [*] JANSSON_DIR = ${JANSSON_DIR}") | ||
message(STATUS " [*] JANSSON_INCLUDE_DIRS = ${JANSSON_INCLUDE_DIRS}") | ||
message(STATUS " [*] JANSSON_LIBRARY = ${JANSSON_LIBRARY}") | ||
# If JANSSON_DIR not specified, then try to automatically find the JANSSON header | ||
# and library | ||
elseif(NOT JANSSON_FOUND) | ||
find_path(JANSSON_INCLUDE_DIRS | ||
NAMES jansson.h | ||
) | ||
|
||
find_library(JANSSON_LIBRARY | ||
NAMES libjansson.so | ||
) | ||
|
||
if(JANSSON_INCLUDE_DIRS AND JANSSON_LIBRARY) | ||
set(JANSSON_FOUND TRUE CACHE INTERNAL "") | ||
set(JANSSON_INCLUDE_DIRS ${JANSSON_INCLUDE_DIRS} CACHE PATH "" FORCE) | ||
set(JANSSON_LIBRARY ${JANSSON_LIBRARY} CACHE PATH "" FORCE) | ||
include_directories(${JANSSON_INCLUDE_DIRS}) | ||
|
||
message(STATUS "FOUND jansson using find_library()") | ||
message(STATUS " [*] JANSSON_INCLUDE_DIRS = ${JANSSON_INCLUDE_DIRS}") | ||
message(STATUS " [*] JANSSON_LIBRARY = ${JANSSON_LIBRARY}") | ||
endif() | ||
endif() | ||
|
||
# Abort if all methods fail | ||
if(NOT JANSSON_FOUND) | ||
message(FATAL_ERROR "Jansson support needs explict JANSSON_DIR") | ||
endif() |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
find_package(LLVM REQUIRED CONFIG) |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
find_package(MPI REQUIRED) |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
find_package(OpenSSL REQUIRED) |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
find_package(Threads REQUIRED) |
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 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,9 +1,10 @@ | ||
# support C++14 features used by LLVM 10.0.0 | ||
set(CMAKE_CXX_STANDARD 14) | ||
|
||
find_package(LLVM REQUIRED CONFIG) | ||
add_definitions(${LLVM_DEFINITIONS}) | ||
include_directories(${LLVM_INCLUDE_DIRS}) | ||
link_directories(${LLVM_LIBRARY_DIRS}) | ||
if(LLVM_FOUND) | ||
add_definitions(${LLVM_DEFINITIONS}) | ||
include_directories(${LLVM_INCLUDE_DIRS}) | ||
link_directories(${LLVM_LIBRARY_DIRS}) | ||
endif() | ||
|
||
add_subdirectory(weave) |
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