Skip to content

Commit 8655289

Browse files
Update formatting and comments. Updated todo
1 parent 0e64106 commit 8655289

File tree

4 files changed

+55
-7
lines changed

4 files changed

+55
-7
lines changed

Src/runcpp2/CompilingLinking.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,8 @@ namespace
312312
i,
313313
&profile,
314314
&currentOutputTypeInfo,
315-
substitutionMap,
315+
substitutionMap, //NOTE: substitutionMap is used by the next source file,
316+
// therefore need to copy it.
316317
&buildDir,
317318
compileAsExecutable,
318319
&scriptInfo,
@@ -437,7 +438,7 @@ namespace
437438

438439
return true;
439440
}
440-
)
441+
) //std::async
441442
); //actions.emplace_back
442443
finished.emplace_back(false);
443444

@@ -491,8 +492,8 @@ namespace
491492

492493
actions.clear();
493494
finished.clear();
494-
}
495-
}
495+
} //if(actions.size() >= maxThreads || i == sourceFiles.size() - 1)
496+
} //for(int i = 0; i < sourceFiles.size(); ++i)
496497

497498
ssLOG_OUTPUT_ALL_CACHE_GROUPED();
498499
return !failedAny;

Src/runcpp2/DependenciesHelper.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,16 @@ namespace
234234

235235
dependencies.at(i)
236236
->AbsoluteIncludePaths
237-
.push_back(ghc::filesystem::absolute( dependenciesCopiesPaths.at(i) + "/" +
238-
dependencies.at(i)->IncludePaths.at(j)).string());
237+
.push_back
238+
(
239+
ghc::filesystem::absolute
240+
(
241+
dependenciesCopiesPaths.at(i) +
242+
"/" +
243+
dependencies.at(i)->IncludePaths.at(j)
244+
)
245+
.string()
246+
);
239247

240248
ssLOG_DEBUG("Include path added: " << dependencies.at(i)->AbsoluteIncludePaths.back());
241249
}

Src/runcpp2/runcpp2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ runcpp2::StartPipeline( const std::string& scriptPath,
502502
if(result != PipelineResult::SUCCESS)
503503
return result;
504504

505-
//Check if script info has changed if provided
505+
//Check if script info has changed if provided and run setup if needed
506506
bool recompileNeeded = false;
507507
bool relinkNeeded = false;
508508
std::vector<std::string> changedDependencies;

mkdocs/docs/TODO.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
- Allow runcpp2 to be library for scriptable pipeline
1818
- Add ability to reference local YAML for user config
1919
- Add version for default user config and prompt for update
20+
- Add platform map for PreferredProfile for user config
2021
- Add more default profiles
2122

2223
### v0.4.0
@@ -36,6 +37,44 @@
3637
## Planned But Low Priority
3738

3839
- Smoother CMake support by reading cmake target properties (https://stackoverflow.com/a/56738858/23479578)
40+
<!--
41+
if(NOT CMAKE_PROPERTY_LIST)
42+
execute_process(COMMAND cmake --help-property-list OUTPUT_VARIABLE CMAKE_PROPERTY_LIST)
43+
44+
# Convert command output into a CMake list
45+
string(REGEX REPLACE ";" "\\\\;" CMAKE_PROPERTY_LIST "${CMAKE_PROPERTY_LIST}")
46+
string(REGEX REPLACE "\n" ";" CMAKE_PROPERTY_LIST "${CMAKE_PROPERTY_LIST}")
47+
list(REMOVE_DUPLICATES CMAKE_PROPERTY_LIST)
48+
endif()
49+
50+
function(print_properties)
51+
message("CMAKE_PROPERTY_LIST = ${CMAKE_PROPERTY_LIST}")
52+
endfunction()
53+
54+
function(print_target_properties target)
55+
if(NOT TARGET ${target})
56+
message(STATUS "There is no target named '${target}'")
57+
return()
58+
endif()
59+
60+
foreach(property ${CMAKE_PROPERTY_LIST})
61+
string(REPLACE "<CONFIG>" "${CMAKE_BUILD_TYPE}" property ${property})
62+
63+
# Fix https://stackoverflow.com/questions/32197663/how-can-i-remove-the-the-location-property-may-not-be-read-from-target-error-i
64+
if(property STREQUAL "LOCATION" OR property MATCHES "^LOCATION_" OR property MATCHES "_LOCATION$")
65+
continue()
66+
endif()
67+
68+
get_property(was_set TARGET ${target} PROPERTY ${property} SET)
69+
if(was_set)
70+
get_target_property(value ${target} ${property})
71+
message("${target} ${property} = ${value}")
72+
endif()
73+
endforeach()
74+
endfunction()
75+
76+
print_target_properties(matplot)
77+
-->
3978
- Add the ability to specify different profiles(?)/defines for different source files
4079
- Handle escape characters at the end
4180
- To avoid situation like this:

0 commit comments

Comments
 (0)