Skip to content

Commit fe9a193

Browse files
committed
Move some projects to solution folders.
1 parent 14a5e83 commit fe9a193

3 files changed

Lines changed: 16 additions & 9 deletions

File tree

src/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ set(inserter_src
6060
inserter.cpp
6161
)
6262
add_executable(inserter ${inserter_src})
63+
set_property(TARGET inserter PROPERTY FOLDER gen)
6364
if (NOT CPPAN_BUILD)
6465
target_link_libraries(inserter ${Boost_LIBRARIES})
6566
else()
@@ -87,12 +88,14 @@ add_custom_target(inserts_gen
8788
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/inserts.cpp PROPERTIES GENERATED TRUE)
8889

8990
add_executable(stamp_genenerator stamp_gen.cpp)
91+
set_property(TARGET stamp_genenerator PROPERTY FOLDER gen)
9092
set(stamp ${CMAKE_CURRENT_BINARY_DIR}/stamp.h.in)
9193
set_source_files_properties(${stamp} PROPERTIES GENERATED True)
9294

9395
add_custom_target(gen_stamp
9496
COMMAND stamp_genenerator > ${stamp}
9597
)
98+
set_property(TARGET gen_stamp PROPERTY FOLDER gen)
9699

97100
file(GLOB common_src "common/*" "printers/*")
98101
set(common_src ${common_src}

src/bazel/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,6 @@ add_library(bazel_parser ${parser_src} ${bazel_parser_src})
4545

4646
add_executable(bazel_parser_test test.cpp)
4747
target_link_libraries(bazel_parser_test bazel_parser)
48+
set_property(TARGET bazel_parser_test PROPERTY FOLDER test)
4849

4950
################################################################################

src/common/project.cpp

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -625,16 +625,19 @@ void Project::load(const yaml &root)
625625
if (cxx.empty())
626626
EXTRACT_VAR(root, cxx, "c++", String);
627627

628-
try
628+
if (!cxx.empty())
629629
{
630-
cxx_standard = std::stoi(cxx);
631-
}
632-
catch (const std::exception&)
633-
{
634-
if (cxx == "1z")
635-
cxx_standard = 17;
636-
else if (cxx == "2x")
637-
cxx_standard = 20;
630+
try
631+
{
632+
cxx_standard = std::stoi(cxx);
633+
}
634+
catch (const std::exception&)
635+
{
636+
if (cxx == "1z")
637+
cxx_standard = 17;
638+
else if (cxx == "2x")
639+
cxx_standard = 20;
640+
}
638641
}
639642
}
640643

0 commit comments

Comments
 (0)