Skip to content

Commit

Permalink
Fix docopt
Browse files Browse the repository at this point in the history
They also got rid of the annoying difference where the Linux library was oddly named 'docopt_s' and the Windows library was the more sensible 'docopt'. So I can collapse my cmake file.
  • Loading branch information
acgetchell committed Mar 11, 2024
1 parent 891c1fb commit ca6b24c
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 78 deletions.
109 changes: 33 additions & 76 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,87 +2,44 @@ add_executable(initialize ${PROJECT_SOURCE_DIR}/src/initialize.cpp)

# On macOS and Linux docopt builds an intermediate object, thus different targets than Windows See
# https://github.com/microsoft/vcpkg/issues/8666
if(WIN32)
target_link_libraries(
initialize
PRIVATE project_options
project_warnings
date::date-tz
docopt
fmt::fmt-header-only
Eigen3::Eigen
spdlog::spdlog_header_only
TBB::tbb
CGAL::CGAL)
else()
target_link_libraries(
initialize
PRIVATE project_options
project_warnings
date::date-tz
docopt_s
fmt::fmt-header-only
Eigen3::Eigen
spdlog::spdlog_header_only
TBB::tbb
CGAL::CGAL)
endif()
target_link_libraries(
initialize
PRIVATE project_options
project_warnings
date::date-tz
docopt
fmt::fmt-header-only
Eigen3::Eigen
spdlog::spdlog_header_only
TBB::tbb
CGAL::CGAL)
target_compile_features(initialize PRIVATE cxx_std_20)

add_executable(cdt-opt ${PROJECT_SOURCE_DIR}/src/cdt-opt.cpp)
if(WIN32)
target_link_libraries(
cdt-opt
PRIVATE project_options
project_warnings
date::date-tz
docopt
fmt::fmt-header-only
Eigen3::Eigen
spdlog::spdlog_header_only
TBB::tbb
CGAL::CGAL)
else()
target_link_libraries(
cdt-opt
PRIVATE project_options
project_warnings
date::date-tz
docopt_s
fmt::fmt-header-only
Eigen3::Eigen
spdlog::spdlog_header_only
TBB::tbb
CGAL::CGAL)
endif()
target_link_libraries(
cdt-opt
PRIVATE project_options
project_warnings
date::date-tz
fmt::fmt-header-only
Eigen3::Eigen
spdlog::spdlog_header_only
TBB::tbb
CGAL::CGAL)
target_compile_features(cdt-opt PRIVATE cxx_std_20)

add_executable(cdt ${PROJECT_SOURCE_DIR}/src/cdt.cpp)
if(WIN32)
target_link_libraries(
cdt
PRIVATE project_options
project_warnings
date::date-tz
docopt
fmt::fmt-header-only
Eigen3::Eigen
spdlog::spdlog_header_only
TBB::tbb
CGAL::CGAL)
else()
target_link_libraries(
cdt
PRIVATE project_options
project_warnings
date::date-tz
docopt_s
fmt::fmt-header-only
Eigen3::Eigen
spdlog::spdlog_header_only
TBB::tbb
CGAL::CGAL)
endif()
target_link_libraries(
cdt
PRIVATE project_options
project_warnings
date::date-tz
docopt
fmt::fmt-header-only
Eigen3::Eigen
spdlog::spdlog_header_only
TBB::tbb
CGAL::CGAL)
target_compile_features(cdt PRIVATE cxx_std_20)

# Build cdt-viewer locally, but not in CI since QT takes more than an hour to build there
Expand All @@ -93,7 +50,7 @@ if(APPLE AND NOT ($ENV{CI}))
PRIVATE project_options
project_warnings
date::date-tz
docopt_s
docopt
fmt::fmt-header-only
Eigen3::Eigen
spdlog::spdlog_header_only
Expand Down
2 changes: 1 addition & 1 deletion src/cdt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/// https://github.com/ucdavis/CDT.

#include <CGAL/Real_timer.h>

Check failure on line 13 in src/cdt.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter

src/cdt.cpp:13:10 [clang-diagnostic-error]

'CGAL/Real_timer.h' file not found
#include <docopt.h>
#include <docopt/docopt.h>

#include <Metropolis.hpp>

Expand Down
2 changes: 1 addition & 1 deletion src/initialize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/// @brief Generates initial spacetimes
/// @author Adam Getchell

#include <docopt.h>
#include <docopt/docopt.h>

Check failure on line 11 in src/initialize.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter

src/initialize.cpp:11:10 [clang-diagnostic-error]

'docopt/docopt.h' file not found

#include "Manifold.hpp"

Expand Down

0 comments on commit ca6b24c

Please sign in to comment.