diff options
author | Sven Gothel <[email protected]> | 2022-12-09 03:34:16 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2022-12-09 03:34:16 +0100 |
commit | a1151a1cc3a6e4be6abbfc7dc0f740080b970a32 (patch) | |
tree | 1664f1a2ca74dcd47b90dcbf9f1313dd1e5bbea2 | |
parent | 800865fc0f65a16171870c688d9cc5d347bba6c4 (diff) | |
parent | 08d54c3f1a4751cc131def9537135d447c95af75 (diff) |
Merge branch 'test'
-rw-r--r-- | .cproject | 28 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | .settings/language.settings.xml | 4 | ||||
-rw-r--r-- | README.md | 10 | ||||
-rwxr-xr-x | scripts/eclipse-cmake-prepare.sh | 43 | ||||
-rw-r--r-- | src/gen-river/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/gen-salesman/CMakeLists.txt | 1 |
7 files changed, 64 insertions, 28 deletions
@@ -9,6 +9,8 @@ <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> + <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> + <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/> </extensions> </storageModule> <storageModule moduleId="cdtBuildSystem" version="4.0.0"> @@ -16,7 +18,7 @@ <folderInfo id="cdt.managedbuild.config.gnu.exe.debug.1503876243." name="/" resourcePath=""> <toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.833932941" name="Linux GCC" nonInternalBuilderId="cdt.managedbuild.target.gnu.builder.exe.debug" superClass="cdt.managedbuild.toolchain.gnu.exe.debug"> <targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.1078652716" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/> - <builder autoBuildTarget="all" buildPath="${workspace_loc:/genetic}/Debug" cleanBuildTarget="clean" id="org.eclipse.cdt.build.core.internal.builder.1580126562" incrementalBuildTarget="all" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="org.eclipse.cdt.build.core.internal.builder"/> + <builder buildPath="${workspace_loc:/gentech}/Debug" id="cdt.managedbuild.target.gnu.builder.exe.debug.123065117" incrementalBuildTarget="install" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/> <tool id="cdt.managedbuild.tool.gnu.archiver.base.599733654" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/> <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1319137915" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug"> <option id="gnu.cpp.compiler.exe.debug.option.optimization.level.1057724120" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/> @@ -26,11 +28,10 @@ <option id="gnu.cpp.compiler.option.warnings.toerrors.91083530" name="Warnings as errors (-Werror)" superClass="gnu.cpp.compiler.option.warnings.toerrors" useByScannerDiscovery="false" value="true" valueType="boolean"/> <option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.cpp.compiler.option.include.paths.195142853" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath"> <listOptionValue builtIn="false" value=""${workspace_loc:/gentech/include}""/> - <listOptionValue builtIn="false" value=""${workspace_loc:/gentech/src/jaulibs}""/> <listOptionValue builtIn="false" value=""${workspace_loc:/gentech/jaulib/include}""/> </option> <option id="gnu.cpp.compiler.option.other.other.480727610" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" useByScannerDiscovery="false" value="-c -fmessage-length=0 -Wno-multichar -Wtype-limits -Wsign-compare -Wcast-align=strict -Wnull-dereference -Winit-self -Wformat=2 -Wformat-overflow=2 -Wformat-nonliteral -Wformat-security -Wformat-signedness -Wformat-y2k -Werror -Wno-error=array-bounds -Wno-error=null-dereference -Wno-multichar" valueType="string"/> - <option id="gnu.cpp.compiler.option.warnings.wshadow.1551277364" superClass="gnu.cpp.compiler.option.warnings.wshadow" useByScannerDiscovery="false" value="true" valueType="boolean"/> + <option id="gnu.cpp.compiler.option.warnings.wshadow.1551277364" name="Local symbol shadows upper scope symbol (-Wshadow)" superClass="gnu.cpp.compiler.option.warnings.wshadow" useByScannerDiscovery="false" value="true" valueType="boolean"/> <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.136382677" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/> </tool> <tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1640782477" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug"> @@ -38,7 +39,6 @@ <option defaultValue="gnu.c.debugging.level.max" id="gnu.c.compiler.exe.debug.option.debugging.level.241027834" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" useByScannerDiscovery="false" valueType="enumerated"/> <option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.c.compiler.option.include.paths.1919287758" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath"> <listOptionValue builtIn="false" value=""${workspace_loc:/gentech/include}""/> - <listOptionValue builtIn="false" value=""${workspace_loc:/gentech/src/jaulibs}""/> <listOptionValue builtIn="false" value=""${workspace_loc:/gentech/jaulib/include}""/> </option> <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.235296482" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> @@ -53,7 +53,6 @@ <tool id="cdt.managedbuild.tool.gnu.assembler.exe.debug.1050418530" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug"> <option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.both.asm.option.include.paths.1626865343" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" useByScannerDiscovery="false" valueType="includePath"> <listOptionValue builtIn="false" value=""${workspace_loc:/gentech/include}""/> - <listOptionValue builtIn="false" value=""${workspace_loc:/gentech/src/jaulibs}""/> <listOptionValue builtIn="false" value=""${workspace_loc:/gentech/jaulib/include}""/> </option> <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1675286337" superClass="cdt.managedbuild.tool.gnu.assembler.input"/> @@ -67,7 +66,6 @@ <entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src/gen-river"/> <entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src/gen-salesman"/> <entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src/gentech"/> - <entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src/jaulibs"/> </sourceEntries> </configuration> </storageModule> @@ -90,16 +88,13 @@ <folderInfo id="cdt.managedbuild.config.gnu.exe.release.1875225910." name="/" resourcePath=""> <toolChain id="cdt.managedbuild.toolchain.gnu.exe.release.1917013333" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.release"> <targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.release.723736577" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.release"/> - <builder buildPath="${workspace_loc:/genetic}/Release" id="cdt.managedbuild.target.gnu.builder.exe.release.924834323" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.release"/> + <builder buildPath="${workspace_loc:/gentech}/Release" id="cdt.managedbuild.target.gnu.builder.exe.release.924834323" incrementalBuildTarget="install" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.release"/> <tool id="cdt.managedbuild.tool.gnu.archiver.base.1506121913" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/> <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.748040679" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release"> <option id="gnu.cpp.compiler.exe.release.option.optimization.level.1018031629" name="Optimization Level" superClass="gnu.cpp.compiler.exe.release.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/> <option defaultValue="gnu.cpp.compiler.debugging.level.none" id="gnu.cpp.compiler.exe.release.option.debugging.level.1998447896" name="Debug Level" superClass="gnu.cpp.compiler.exe.release.option.debugging.level" useByScannerDiscovery="false" valueType="enumerated"/> <option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.cpp.compiler.option.include.paths.1201969754" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath"> - <listOptionValue builtIn="false" value=""${workspace_loc:/genetic/src/jaulibs}""/> - <listOptionValue builtIn="false" value=""${workspace_loc:/genetic/include}""/> <listOptionValue builtIn="false" value=""${workspace_loc:/gentech/include}""/> - <listOptionValue builtIn="false" value=""${workspace_loc:/gentech/src/jaulibs}""/> <listOptionValue builtIn="false" value=""${workspace_loc:/gentech/jaulib/include}""/> </option> <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1648176116" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/> @@ -108,10 +103,7 @@ <option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.1773763733" name="Optimization Level" superClass="gnu.c.compiler.exe.release.option.optimization.level" useByScannerDiscovery="false" valueType="enumerated"/> <option defaultValue="gnu.c.debugging.level.none" id="gnu.c.compiler.exe.release.option.debugging.level.1679678292" name="Debug Level" superClass="gnu.c.compiler.exe.release.option.debugging.level" useByScannerDiscovery="false" valueType="enumerated"/> <option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.c.compiler.option.include.paths.461519058" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath"> - <listOptionValue builtIn="false" value=""${workspace_loc:/genetic/src/gentech.lib}""/> - <listOptionValue builtIn="false" value=""${workspace_loc:/genetic/src/jaulibs}""/> <listOptionValue builtIn="false" value=""${workspace_loc:/gentech/include}""/> - <listOptionValue builtIn="false" value=""${workspace_loc:/gentech/src/jaulibs}""/> <listOptionValue builtIn="false" value=""${workspace_loc:/gentech/jaulib/include}""/> </option> <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1303503308" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> @@ -125,10 +117,7 @@ </tool> <tool id="cdt.managedbuild.tool.gnu.assembler.exe.release.1803921445" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.release"> <option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.both.asm.option.include.paths.2071633435" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath"> - <listOptionValue builtIn="false" value=""${workspace_loc:/genetic/src/gentech.lib}""/> - <listOptionValue builtIn="false" value=""${workspace_loc:/genetic/src/jaulibs}""/> <listOptionValue builtIn="false" value=""${workspace_loc:/gentech/include}""/> - <listOptionValue builtIn="false" value=""${workspace_loc:/gentech/src/jaulibs}""/> <listOptionValue builtIn="false" value=""${workspace_loc:/gentech/jaulib/include}""/> </option> <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1019462764" superClass="cdt.managedbuild.tool.gnu.assembler.input"/> @@ -140,7 +129,6 @@ <entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src/gen-river"/> <entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src/gen-salesman"/> <entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src/gentech"/> - <entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src/jaulibs"/> </sourceEntries> </configuration> </storageModule> @@ -148,7 +136,7 @@ </cconfiguration> </storageModule> <storageModule moduleId="cdtBuildSystem" version="4.0.0"> - <project id="genetic.cdt.managedbuild.target.gnu.exe.1378869262" name="Executable" projectType="cdt.managedbuild.target.gnu.exe"/> + <project id="gentech.cdt.managedbuild.target.gnu.exe.1378869262" name="Executable" projectType="cdt.managedbuild.target.gnu.exe"/> </storageModule> <storageModule moduleId="scannerConfiguration"> <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> @@ -168,10 +156,10 @@ <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/> <storageModule moduleId="refreshScope" versionNumber="2"> <configuration configurationName="Debug"> - <resource resourceType="PROJECT" workspacePath="/genetic"/> + <resource resourceType="PROJECT" workspacePath="/gentech"/> </configuration> <configuration configurationName="Release"> - <resource resourceType="PROJECT" workspacePath="/genetic"/> + <resource resourceType="PROJECT" workspacePath="/gentech"/> </configuration> </storageModule> <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/> @@ -1,6 +1,5 @@ -/bin/ -/obj/ -/Debug/ +/Debug*/ +/Release*/ /.cache/ /river-data/ /salesman-data/ diff --git a/.settings/language.settings.xml b/.settings/language.settings.xml index f9ac7a7..2a69a07 100644 --- a/.settings/language.settings.xml +++ b/.settings/language.settings.xml @@ -5,7 +5,7 @@ <provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/> <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/> <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/> - <provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-394275885746499221" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true"> + <provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-409401049006019449" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true"> <language-scope id="org.eclipse.cdt.core.gcc"/> <language-scope id="org.eclipse.cdt.core.g++"/> </provider> @@ -16,7 +16,7 @@ <provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/> <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/> <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/> - <provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-394279319252045303" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true"> + <provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-409404355219931095" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true"> <language-scope id="org.eclipse.cdt.core.gcc"/> <language-scope id="org.eclipse.cdt.core.g++"/> </provider> @@ -101,7 +101,15 @@ make doc IDE integration configuration files are provided for - [Eclipse](https://download.eclipse.org/eclipse/downloads/) with extensions - [CDT](https://github.com/eclipse-cdt/) or [CDT @ eclipse.org](https://projects.eclipse.org/projects/tools.cdt) - - `CMake Support`, install `C/C++ CMake Build Support` with ID `org.eclipse.cdt.cmake.feature.group` + - Not used due to lack of subproject include file and symbol resolution: + - `CMake Support`, install `C/C++ CMake Build Support` with ID `org.eclipse.cdt.cmake.feature.group` + +From the project root directory, prepare the `Debug` folder using `cmake` +~~~~~~~~~~~~~ +./scripts/eclipse-cmake-prepare.sh +~~~~~~~~~~~~~ + +The existing project setup is just using `external build` via `make`. You can import the project to your workspace via `File . Import...` and `Existing Projects into Workspace` menu item. diff --git a/scripts/eclipse-cmake-prepare.sh b/scripts/eclipse-cmake-prepare.sh new file mode 100755 index 0000000..32043b4 --- /dev/null +++ b/scripts/eclipse-cmake-prepare.sh @@ -0,0 +1,43 @@ +#! /bin/sh + +sdir=`dirname $(readlink -f $0)` +rootdir=`dirname $sdir` +bname=`basename $0 .sh` + +debug_dist_dir="Debug-dist" +debug_build_dir="Debug" +echo debug_dist_dir $debug_dist_dir +echo debug_build_dir $debug_build_dir + +release_dist_dir="Release-dist" +release_build_dir="Release" +echo release_dist_dir $release_dist_dir +echo release_build_dir $release_build_dir + +cd $rootdir +rm -rf $debug_dist_dir +mkdir -p $debug_dist_dir +rm -rf $debug_build_dir +mkdir -p $debug_build_dir +cd $debug_build_dir +# CLANG_ARGS="-DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++" +# CLANG_ARGS="-DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy;-p;$rootdir/$debug_build_dir" + +#cmake $CLANG_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/$debug_dist_dir .. +#cmake $CLANG_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/$debug_dist_dir -DBUILD_TESTING=ON .. +cmake $CLANG_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/$debug_dist_dir -DDEBUG=ON .. +#cmake $CLANG_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/$debug_dist_dir -DBUILD_TESTING=ON -DDEBUG=ON .. +#cmake $CLANG_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/$debug_dist_dir -DBUILD_TESTING=ON -DDEBUG=ON -DINSTRUMENTATION=ON .. + +cd $rootdir +rm -rf $release_dist_dir +mkdir -p $release_dist_dir +rm -rf $release_build_dir +mkdir -p $release_build_dir +cd $release_build_dir +# CLANG_ARGS="-DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++" +# CLANG_ARGS="-DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy;-p;$rootdir/$release_build_dir" + +cmake $CLANG_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/$release_dist_dir .. + +cd $rootdir diff --git a/src/gen-river/CMakeLists.txt b/src/gen-river/CMakeLists.txt index 0def737..72a47b8 100644 --- a/src/gen-river/CMakeLists.txt +++ b/src/gen-river/CMakeLists.txt @@ -1,6 +1,5 @@ include_directories( ${PROJECT_SOURCE_DIR}/jaulib/include - ${PROJECT_SOURCE_DIR}/src/jaulibs ${PROJECT_SOURCE_DIR}/include ) diff --git a/src/gen-salesman/CMakeLists.txt b/src/gen-salesman/CMakeLists.txt index 6f58773..a29cd7e 100644 --- a/src/gen-salesman/CMakeLists.txt +++ b/src/gen-salesman/CMakeLists.txt @@ -1,6 +1,5 @@ include_directories( ${PROJECT_SOURCE_DIR}/jaulib/include - ${PROJECT_SOURCE_DIR}/src/jaulibs ${PROJECT_SOURCE_DIR}/include ) |