From c87f2cdaafa2d023f44ec90b9ec958ae95dad4c3 Mon Sep 17 00:00:00 2001 From: DjWarmonger Date: Sun, 26 Oct 2014 12:32:19 +0100 Subject: [PATCH] Updated build for MSVS. Some compile fixes to FuzzyLite source. --- AI/FuzzyLite/FuzzyLite.vcxproj | 214 ++++++++++++++---- AI/FuzzyLite/fuzzylite/CMakeLists.txt | 8 +- AI/FuzzyLite/fuzzylite/fl/fuzzylite.h | 2 + .../fuzzylite/src/imex/FclImporter.cpp | 2 +- AI/VCAI/Fuzzy.cpp | 2 + AI/VCAI/VCAI.vcxproj | 6 +- 6 files changed, 183 insertions(+), 51 deletions(-) diff --git a/AI/FuzzyLite/FuzzyLite.vcxproj b/AI/FuzzyLite/FuzzyLite.vcxproj index 51daab1f1..f03e428b8 100644 --- a/AI/FuzzyLite/FuzzyLite.vcxproj +++ b/AI/FuzzyLite/FuzzyLite.vcxproj @@ -1,4 +1,4 @@ - + @@ -19,44 +19,172 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {D15B34EC-A32C-4968-9B0B-66998B579364} @@ -141,6 +269,9 @@ $(OutDir)..;%(AdditionalLibraryDirectories) $(OutDir)FuzzyLite.dll + + ./fuzzylite;. + @@ -161,6 +292,11 @@ $(OutDir)..;%(AdditionalLibraryDirectories) $(OutDir)FuzzyLite.dll + + ./fuzzylite;. + NotUsing + StdInc.h + diff --git a/AI/FuzzyLite/fuzzylite/CMakeLists.txt b/AI/FuzzyLite/fuzzylite/CMakeLists.txt index 5356e817e..7dfde3de0 100644 --- a/AI/FuzzyLite/fuzzylite/CMakeLists.txt +++ b/AI/FuzzyLite/fuzzylite/CMakeLists.txt @@ -14,7 +14,7 @@ add_definitions(-DFL_BUILD_PATH="${CMAKE_SOURCE_DIR}") #used to determine FL__FI option(FL_USE_FLOAT "Use fl::scalar as float" OFF) option(FL_BACKTRACE "Provide backtrace information in case of errors" OFF) -option(FL_CPP11 "Builds utilizing C++11, i.e., passing -std=c++11" ON) +option(FL_CPP11 "Builds utilizing C++11, i.e., passing -std=c++11" OFF) if(FL_USE_FLOAT) add_definitions(-DFL_USE_FLOAT) @@ -104,17 +104,11 @@ add_library(fl-shared SHARED ${fl-headers} ${fl-sources}) set_target_properties(fl-shared PROPERTIES OUTPUT_NAME fuzzylite) set_target_properties(fl-shared PROPERTIES DEBUG_POSTFIX d) set_target_properties(fl-shared PROPERTIES COMPILE_DEFINITIONS "FL_EXPORT_LIBRARY") -if (UNIX) -set_target_properties(fl-shared PROPERTIES COMPILE_FLAGS "-fPIC") -endif() target_link_libraries(fl-shared ${FL_LIBS}) add_library(fl-static STATIC ${fl-headers} ${fl-sources}) set_target_properties(fl-static PROPERTIES OUTPUT_NAME fuzzylite-static) set_target_properties(fl-static PROPERTIES DEBUG_POSTFIX d) -if (UNIX) -set_target_properties(fl-static PROPERTIES COMPILE_FLAGS "-fPIC") -endif() target_link_libraries(fl-static ${FL_LIBS}) add_executable(fl-bin src/main.cpp) diff --git a/AI/FuzzyLite/fuzzylite/fl/fuzzylite.h b/AI/FuzzyLite/fuzzylite/fl/fuzzylite.h index 2931f198a..1c892d3ac 100644 --- a/AI/FuzzyLite/fuzzylite/fl/fuzzylite.h +++ b/AI/FuzzyLite/fuzzylite/fl/fuzzylite.h @@ -30,6 +30,8 @@ #include #include #include +#include "../../Global.h" +#include #ifndef FL_VERSION #define FL_VERSION "?" diff --git a/AI/FuzzyLite/fuzzylite/src/imex/FclImporter.cpp b/AI/FuzzyLite/fuzzylite/src/imex/FclImporter.cpp index da6308d8b..1d222354d 100644 --- a/AI/FuzzyLite/fuzzylite/src/imex/FclImporter.cpp +++ b/AI/FuzzyLite/fuzzylite/src/imex/FclImporter.cpp @@ -531,7 +531,7 @@ namespace fl { if (token.size() != 2) { std::ostringstream ex; ex << "[syntax error] expected property of type 'start .. end', " - << "but found <" << range << "> in line: " << line; + << "but found <" << range.str() << "> in line: " << line; throw fl::Exception(ex.str(), FL_AT); } scalar minimum, maximum; diff --git a/AI/VCAI/Fuzzy.cpp b/AI/VCAI/Fuzzy.cpp index 676c1ed7f..812006d12 100644 --- a/AI/VCAI/Fuzzy.cpp +++ b/AI/VCAI/Fuzzy.cpp @@ -1,5 +1,7 @@ #include "StdInc.h" #include "Fuzzy.h" +#include "src/Engine.cpp" +#include "src/Operation.cpp" #include #include "../../lib/mapObjects/MapObjects.h" diff --git a/AI/VCAI/VCAI.vcxproj b/AI/VCAI/VCAI.vcxproj index 2fe4459be..679d466ae 100644 --- a/AI/VCAI/VCAI.vcxproj +++ b/AI/VCAI/VCAI.vcxproj @@ -87,8 +87,7 @@ - - + $(FUZZYLITEDIR) Use StdInc.h /Zm210 %(AdditionalOptions) @@ -113,8 +112,7 @@ - - + $(FUZZYLITEDIR) Use StdInc.h /Zm199 %(AdditionalOptions)