Skip to content

Commit c58a43d

Browse files
committed
Revert build alias deps.
1 parent f25a72d commit c58a43d

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ cppan_add_package(
156156

157157
pvt.cppan.demo.catchorg.catch2-2
158158
)
159+
#set(CPPAN_FORCE 1)
159160
cppan_execute()
160161

161162
################################################################################

src/inserts/CPPANConfig.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,12 @@ endfunction()
3030
function(cppan_execute)
3131
message(STATUS "cppan: processing dependencies")
3232

33+
if (CPPAN_FORCE)
34+
set(CPPAN_FORCE -s)
35+
endif()
36+
3337
execute_process(
34-
COMMAND ${CPPAN_EXECUTABLE} -d "${CPPAN_DEPS_DIR}"
38+
COMMAND ${CPPAN_EXECUTABLE} -d "${CPPAN_DEPS_DIR}" ${CPPAN_FORCE}
3539
RESULT_VARIABLE ret
3640
)
3741
if (NOT ${ret} EQUAL 0)

src/printers/cmake.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ endif()
772772
local.addLine();
773773

774774
// alias dependencies
775-
/*if (d.empty())
775+
if (d.empty())
776776
{
777777
auto tt = "add_dependencies"s;
778778
for (auto &dp : build_deps)
@@ -786,7 +786,7 @@ endif()
786786
return tt + "(" + s + " ${this})";
787787
});
788788
}
789-
}*/
789+
}
790790

791791
if (has_build_deps)
792792
ctx.addWithRelativeIndent(local);
@@ -1261,7 +1261,8 @@ int CMakePrinter::generate(const BuildSettings &bs) const
12611261
c.args.push_back("-DCPPAN_BUILD_VERBOSE="s + (s.build_system_verbose ? "1" : "0"));
12621262
c.args.push_back("-DCPPAN_BUILD_WARNING_LEVEL="s + std::to_string(s.build_warning_level));
12631263
c.args.push_back("-DCPPAN_USE_CACHE="s + (s.use_cache ? "1" : "0"));
1264-
c.args.push_back("-DCPPAN_SHORT_LOCAL_NAMES="s + (s.short_local_names ? "1" : "0"));
1264+
if (s.short_local_names)
1265+
c.args.push_back("-DCPPAN_SHORT_LOCAL_NAMES="s + (s.short_local_names ? "1" : "0"));
12651266
//c.args.push_back("-DCPPAN_TEST_RUN="s + (bs.test_run ? "1" : "0"));
12661267
for (auto &o : s.cmake_options)
12671268
c.args.push_back(o);

0 commit comments

Comments
 (0)