You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cmake_minimum_required(VERSION 3.16.0)
project(pdaCodeWorkFlow CXX)
#=====================================================================# we need c++14set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# test if compiler supports standardinclude(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-std=c++14" COMPILER_SUPPORT_CPP14)
if(NOT COMPILER_SUPPORT_CPP14)
message(FATAL_ERROR"Compiler does not support -std=c++14. This is required.")
endif()
#=====================================================================# guard against in-source buildsif(${CMAKE_SOURCE_DIR}STREQUAL${CMAKE_BINARY_DIR})
message(FATAL_ERROR"In-source builds are not allowed. Please make a new directory (e.g. build directory) and run CMake from there.")
endif()
# default to release if build type is emptyif (NOT CMAKE_BUILD_TYPE)
message(STATUS "${CMAKE_BUILD_TYPE} is not specified, defaulting to Release.")
set(CMAKE_BUILD_TYPE "Release")
endif()
# convert cmake build type to lower stringstring(TOLOWER"${CMAKE_BUILD_TYPE}" cmake_build_type_tolower)
if( NOT cmake_build_type_tolower STREQUAL"debug"ANDNOT cmake_build_type_tolower STREQUAL"release")
message(FATAL_ERROR"Unknown build type \"${CMAKE_BUILD_TYPE}\". Allowed values are Debug, Release (case-insensitive).")
endif()
#=====================================================================add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/yaml-cpp-yaml-cpp-0.7.0)
find_package(OpenMP)
if(NOT OpenMP_CXX_FOUND)
message(FATAL_ERROR"You enabled OpenMP but I cannot find it")
endif()
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/../../include
${CMAKE_CURRENT_SOURCE_DIR}/../../tpls/eigen/eigen3
${CMAKE_CURRENT_SOURCE_DIR}/../../tpls/pressio/include
${CMAKE_CURRENT_SOURCE_DIR}/yaml-cpp-yaml-cpp-0.7.0/include
)
add_compile_definitions(PRESSIODEMOAPPS_ENABLE_OPENMP)
set(exename pdaExeWf)
add_executable(${exename}${CMAKE_CURRENT_SOURCE_DIR}/main.cc)
target_link_libraries(${exename}PRIVATE yaml-cpp OpenMP::OpenMP_CXX)
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: