Skip to content

Commit

Permalink
Remove old conan cmake references
Browse files Browse the repository at this point in the history
Fix func omp requirement in compile
Tidy up cmake files
  • Loading branch information
Chrismarsh committed Jan 17, 2024
1 parent 38d8dd6 commit 95ed9b9
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 287 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

set(Boost_NO_WARN_NEW_VERSIONS ON)

if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(MACOSX TRUE)
set(CMAKE_FIND_FRAMEWORK LAST) # framework gdal, etc can end up superceeding other search paths
Expand Down
65 changes: 26 additions & 39 deletions third_party/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,57 +16,46 @@ add_library(SNOWPACK OBJECT
${SNOWPACK_SRCS}
)


target_link_libraries(SNOWPACK PUBLIC
MeteoIO::MeteoIO
)
MeteoIO::MeteoIO
Boost::headers
Boost::system
Boost::filesystem
Boost::date_time
Boost::log
Boost::thread
Boost::regex
Boost::iostreams
Boost::program_options
)

if(BUILD_WITH_CONAN)
target_link_libraries(SNOWPACK PUBLIC
Boost::Boost
)
else()
target_link_libraries(SNOWPACK PUBLIC
Boost::headers
Boost::system
Boost::filesystem
Boost::date_time
Boost::log
Boost::thread
Boost::regex
Boost::iostreams
Boost::program_options
)
endif()

target_include_directories(SNOWPACK PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/src/ # needed for logger.hpp... that's a funny dependence, what is meant by "third party"?
)

###################################
add_library(SNOBAL OBJECT
${CMAKE_CURRENT_SOURCE_DIR}/third_party/snobal/sno.cpp
)
${CMAKE_CURRENT_SOURCE_DIR}/third_party/snobal/sno.cpp
)
target_link_libraries(SNOBAL PUBLIC
Func::Func
)


if(BUILD_WITH_CONAN)
target_link_libraries(SNOBAL PUBLIC
Boost::Boost
)
else()
target_link_libraries(SNOBAL PUBLIC
Boost::headers
Boost::log
)
Func::Func
Boost::headers
Boost::log
)
if(OpenMP_FOUND)
target_link_libraries(SNOBAL PUBLIC OpenMP::OpenMP_CXX)
endif()

target_include_directories(SNOBAL PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/src/ # needed for logger.hpp... that's a funny dependence
)

message(FATAL "${CHM_BUILD_FLAGS}")

set_target_properties( SNOBAL
PROPERTIES
COMPILE_FLAGS ${CHM_BUILD_FLAGS})

###################################
add_library(FSM OBJECT
${CMAKE_CURRENT_SOURCE_DIR}/third_party/FSM/FSM2_CHM.f90
Expand All @@ -86,9 +75,7 @@ set(THIRD_PARTY_TARGETS
set_target_properties( SNOWPACK
PROPERTIES
COMPILE_FLAGS ${CHM_BUILD_FLAGS})
set_target_properties( SNOBAL
PROPERTIES
COMPILE_FLAGS ${CHM_BUILD_FLAGS})


# third party includes in CHM src files to be specified relative to this directory
FOREACH(target ${THIRD_PARTY_TARGETS})
Expand Down
248 changes: 0 additions & 248 deletions third_party/snowpack/plugins/SnowpackIO.cc

This file was deleted.

0 comments on commit 95ed9b9

Please sign in to comment.