diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 324f1a2438..c55061bb1e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -394,7 +394,7 @@ jobs: - name: Build Python 3.12 shell: bash run: | - python makepanda/makepanda.py --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10 + python makepanda/makepanda.py --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10 --msvc-version=14.2 - name: Test Python 3.12 shell: bash run: | @@ -408,7 +408,7 @@ jobs: - name: Build Python 3.11 shell: bash run: | - python makepanda/makepanda.py --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10 + python makepanda/makepanda.py --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10 --msvc-version=14.2 - name: Test Python 3.11 shell: bash run: | @@ -422,7 +422,7 @@ jobs: - name: Build Python 3.10 shell: bash run: | - python makepanda/makepanda.py --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10 + python makepanda/makepanda.py --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10 --msvc-version=14.2 - name: Test Python 3.10 shell: bash run: | @@ -436,7 +436,7 @@ jobs: - name: Build Python 3.9 shell: bash run: | - python makepanda/makepanda.py --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10 + python makepanda/makepanda.py --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10 --msvc-version=14.2 - name: Test Python 3.9 shell: bash run: | @@ -450,7 +450,7 @@ jobs: - name: Build Python 3.8 shell: bash run: | - python makepanda/makepanda.py --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10 + python makepanda/makepanda.py --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10 --msvc-version=14.2 - name: Test Python 3.8 shell: bash run: | diff --git a/README.md b/README.md index c4a18ce8a3..86669b396d 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ Building Panda3D Windows ------- -You can build Panda3D with the Microsoft Visual C++ 2015, 2017, 2019 or 2022 +You can build Panda3D with the Microsoft Visual C++ 2017, 2019 or 2022 compiler, which can be downloaded for free from the [Visual Studio site](https://visualstudio.microsoft.com/downloads/). You will also need to install the [Windows SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-sdk), and if you intend to target Windows Vista, you will also need the diff --git a/doc/CODING_STYLE.md b/doc/CODING_STYLE.md index 614057737d..05814b74e1 100644 --- a/doc/CODING_STYLE.md +++ b/doc/CODING_STYLE.md @@ -184,7 +184,7 @@ Try to group logically-similar lines, separating them with a single blank line. Modern language features ------------------------ -Panda3D is a C++11 project. The use of the following modern language features +Panda3D is a C++14 project. The use of the following modern language features is greatly encouraged: 1. `nullptr` over `NULL` @@ -197,4 +197,4 @@ creating a typedef for the container type instead. Avoid using `std::function` in cases where a lambda can be accepted directly (using a template function), since it has extra overhead over lambdas. -C++14 and C++17 features should be avoided for now. +C++17 features should be avoided for now. diff --git a/dtool/CompilerFlags.cmake b/dtool/CompilerFlags.cmake index 48f931387f..73e8aec99e 100644 --- a/dtool/CompilerFlags.cmake +++ b/dtool/CompilerFlags.cmake @@ -51,8 +51,8 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GCC") endif() -# Panda3D is now a C++11 project. -set(CMAKE_CXX_STANDARD 11) +# Panda3D is now a C++14 project. +set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) # Set certain CMake flags we expect diff --git a/dtool/src/dtoolbase/dtoolbase_cc.h b/dtool/src/dtoolbase/dtoolbase_cc.h index d19db7f5ef..ed55688194 100644 --- a/dtool/src/dtoolbase/dtoolbase_cc.h +++ b/dtool/src/dtoolbase/dtoolbase_cc.h @@ -110,9 +110,9 @@ typedef std::ios::seekdir ios_seekdir; #define INLINE inline #endif -// Determine the availability of C++11 features. -#if defined(_MSC_VER) && _MSC_VER < 1900 // Visual Studio 2015 -#error Microsoft Visual C++ 2015 or later is required to compile Panda3D. +// Determine the availability of C++14 features. +#if defined(_MSC_VER) && _MSC_VER < 1910 // Visual Studio 2017 +#error Microsoft Visual C++ 2017 or later is required to compile Panda3D. #endif // This is just to support code generated with older versions of interrogate. diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 2e4ce0b0cd..4b1339adae 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -156,7 +156,7 @@ def usage(problem): print(" --everything (enable every third-party lib)") print(" --directx-sdk=X (specify version of DirectX SDK to use: jun2010, aug2009)") print(" --windows-sdk=X (specify Windows SDK version, eg. 7.1, 8.1, 10 or 11. Default is 8.1)") - print(" --msvc-version=X (specify Visual C++ version, eg. 10, 11, 12, 14, 14.1, 14.2, 14.3. Default is 14)") + print(" --msvc-version=X (specify Visual C++ version, eg. 14.1, 14.2, 14.3. Default is 14.1)") print(" --use-icl (experimental setting to use an intel compiler instead of MSVC on Windows)") print("") print("The simplest way to compile panda is to just type:") @@ -309,8 +309,8 @@ def parseopts(args): if GetTarget() == 'windows': if not MSVC_VERSION: - print("No MSVC version specified. Defaulting to 14 (Visual Studio 2015).") - MSVC_VERSION = (14, 0) + print("No MSVC version specified. Defaulting to 14.1 (Visual Studio 2017).") + MSVC_VERSION = (14, 1) else: try: MSVC_VERSION = tuple(int(d) for d in MSVC_VERSION.split('.'))[:2] @@ -319,12 +319,10 @@ def parseopts(args): except: usage("Invalid setting for --msvc-version") - if MSVC_VERSION < (14, 0): + if MSVC_VERSION < (14, 1): warn_prefix = "%sERROR:%s " % (GetColor("red"), GetColor()) print("=========================================================================") - print(warn_prefix + "Support for MSVC versions before 2015 has been discontinued.") - print(warn_prefix + "For more information, or any questions, please visit:") - print(warn_prefix + " https://github.com/panda3d/panda3d/issues/288") + print(warn_prefix + "Support for MSVC versions before 2017 has been discontinued.") print("=========================================================================") sys.stdout.flush() time.sleep(1.0) @@ -1313,7 +1311,7 @@ def CompileCxx(obj,src,opts): if (COMPILER=="GCC"): if (src.endswith(".c")): cmd = GetCC() +' -fPIC -c -o ' + obj - else: cmd = GetCXX()+' -std=gnu++11 -ftemplate-depth-70 -fPIC -c -o ' + obj + else: cmd = GetCXX()+' -std=gnu++14 -ftemplate-depth-70 -fPIC -c -o ' + obj for (opt, dir) in INCDIRECTORIES: if (opt=="ALWAYS") or (opt in opts): cmd += ' -I' + BracketNameWithQuotes(dir) for (opt, dir) in FRAMEWORKDIRECTORIES: