Compare commits
678 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 256fc7eff3 | |||
| ccc98966e6 | |||
| b0127687c2 | |||
| 8637434db9 | |||
| 199b4c81d1 | |||
| 34b70663d1 | |||
| 1bcf27e1aa | |||
| 8c8a418c95 | |||
| 7317eb3035 | |||
| 1dea8f3ca9 | |||
| 19c54a8a66 | |||
| e6b82ca9e1 | |||
| 7d6bcbc03a | |||
| 8588a85fa1 | |||
| faa260f0ce | |||
| 42299aefca | |||
| 3f5f828c25 | |||
| 18dd3f83ed | |||
| 2255548c52 | |||
| 48226c3346 | |||
| 552309b38e | |||
| b78dd00d31 | |||
| 872d98d7df | |||
| 8502c09b45 | |||
| 34f8982b81 | |||
| 5921f4cd03 | |||
| c78d633d07 | |||
| a8bf9a5f41 | |||
| e23a81e0c4 | |||
| 010d37deda | |||
| 5391e21d4e | |||
| e94e1d9260 | |||
| 1331b1f4b7 | |||
| ba50b8ce79 | |||
| 878f0b8c9c | |||
| eebef0613b | |||
| 2aee1066ef | |||
| 5929a5de39 | |||
| 315585ca87 | |||
| 54b689fc23 | |||
| 0207f7716a | |||
| 7637a991a9 | |||
| ca9489c740 | |||
| aa6f2943a9 | |||
| deb68996f3 | |||
| 32a69b227f | |||
| d9177606f5 | |||
| 71ba4d58fa | |||
| c4a9c75bcc | |||
| b9bd1ca9db | |||
| a2f3edbbf9 | |||
| 912e9a1429 | |||
| dee64c7c5d | |||
| 3fffb79426 | |||
| 0667e59d01 | |||
| a42141ea13 | |||
| ffec2d3055 | |||
| 865652822a | |||
| 7406f274fb | |||
| 71a2315a5c | |||
| 0fcdecc934 | |||
| edfe5f4958 | |||
| 77269ee53b | |||
| 1f42e804d7 | |||
| 25a3bd1239 | |||
| 666600b589 | |||
| 37b5ac7b1c | |||
| 144fa63a8b | |||
| 94b30af836 | |||
| f34b73e46d | |||
| 1c18001290 | |||
| 2a9d56ea7e | |||
| fc48d88bca | |||
| fe51a4d2de | |||
| a1aa127617 | |||
| 23b77b096f | |||
| a2576785e7 | |||
| 1c684b2c25 | |||
| 0eda35d19f | |||
| 55e942ba94 | |||
| 216a30ac57 | |||
| c2ba10d4e4 | |||
| b05242c27a | |||
| 299e7d3f0c | |||
| f5415a2511 | |||
| 7670663f4a | |||
| e8db8a52b4 | |||
| 48004949de | |||
| 9bd72d7bb3 | |||
| 0ff7f0f5ff | |||
| 2462f72ebf | |||
| f1e86b9304 | |||
| 9faedf7618 | |||
| b68dfbaf6d | |||
| 7e08681df4 | |||
| ef4d3714b3 | |||
| fabaf130ec | |||
| 317def083a | |||
| 59341f7570 | |||
| 365fca1abb | |||
| fa88a6e74e | |||
| 0ce373c072 | |||
| 9afc9bb4d3 | |||
| 7aeb9ebfcf | |||
| 6ea40c3e63 | |||
| 3c6140dc26 | |||
| c0363e14da | |||
| d9561a8574 | |||
| 1c04b7cc96 | |||
| 66d406b06f | |||
| 0c9891be4b | |||
| e960b745f9 | |||
| 3aa55e5e91 | |||
| c75fe83a4e | |||
| b8b02f5f46 | |||
| 9040a14d7b | |||
| 0dff5334d1 | |||
| db1f37a98a | |||
| c4e292bd66 | |||
| 9dd074ff6d | |||
| 8de5d74502 | |||
| 5c23509370 | |||
| 78d954d086 | |||
| 526ee2c9c4 | |||
| 95dfb2ede8 | |||
| cfb02b88be | |||
| a28fb062b9 | |||
| c7a1792309 | |||
| 0141331dbd | |||
| 6c8f9b28a0 | |||
| e18e786f76 | |||
| 5613501758 | |||
| 4505c28cb6 | |||
| e605d73d3f | |||
| aff5cdf016 | |||
| 25f929c572 | |||
| fafff3a08b | |||
| 149b64e8ef | |||
| 48dca901e6 | |||
| 11136b282f | |||
| 5d4587cfb3 | |||
| 3209329eb4 | |||
| 2718d4589b | |||
| b11d4211e4 | |||
| 0e3d2a208f | |||
| 5f2ac5479b | |||
| 12dc5829d7 | |||
| b638dba12c | |||
| 2a26b3d01b | |||
| 9ad1aee683 | |||
| cff1b1921c | |||
| 79655aabf6 | |||
| 67b10dd24e | |||
| 630f7bcd29 | |||
| 537ad0fd7a | |||
| 6d35b82899 | |||
| 4dca99183d | |||
| 4ee2c5d9db | |||
| 245b62b8fa | |||
| 7dca20f979 | |||
| 1e55e402ae | |||
| e557658def | |||
| 695f0cfe32 | |||
| 7b29489d3d | |||
| 485f239d6d | |||
| ab3d0c319c | |||
| 9e4419a19c | |||
| b0c4aeee9e | |||
| 5a16f625b7 | |||
| d9e8fe0d7d | |||
| d1707fdf10 | |||
| aaf2b6ed10 | |||
| 4edb2e328c | |||
| 4f9e833512 | |||
| 82d1210f81 | |||
| 9a4b9c5277 | |||
| 9423cb9250 | |||
| cb49d64bbe | |||
| 8f9c76a95d | |||
| 1b1927bed7 | |||
| b027cfbf2e | |||
| 9ea63ce943 | |||
| b5ee6ef952 | |||
| 2ea219412b | |||
| 92bbe88322 | |||
| a1929d704a | |||
| 992c234e2c | |||
| 8aa75c09d1 | |||
| f7f3119d43 | |||
| f0ef15df98 | |||
| a7f1699e0d | |||
| f7f85143bb | |||
| 366fe0b74e | |||
| b10f001c3a | |||
| 1372cdb506 | |||
| 88fae786a5 | |||
| 865997597a | |||
| dc6d5e1e9f | |||
| d88524b4f7 | |||
| b6ff2a67c6 | |||
| a15134d79b | |||
| 80ec1e00b9 | |||
| f1c740af0e | |||
| ff9b93de0d | |||
| 9c944183d0 | |||
| cd92e568d5 | |||
| 807d523660 | |||
| 08fef7405c | |||
| c1f45b0c96 | |||
| a512314442 | |||
| 2fcc5317fe | |||
| 78a2a9c002 | |||
| 076623ef73 | |||
| bbd366b5a7 | |||
| 1ef5bd3fc3 | |||
| 83646753e0 | |||
| bdcf40a17c | |||
| 24e5b181b5 | |||
| d548f81525 | |||
| 3c1047103c | |||
| 47d557545e | |||
| 487b206edb | |||
| 411b6cf4e9 | |||
| 70f8141a7d | |||
| e4fefd67b0 | |||
| bfe65acf87 | |||
| b84e78ac2c | |||
| 6943363280 | |||
| 9b67ca9c42 | |||
| 0df319e430 | |||
| 7601857582 | |||
| 7d28404ad8 | |||
| 5ea9a672c3 | |||
| 6d68d22258 | |||
| 8362c5af8b | |||
| 51449826a3 | |||
| 10ccab5227 | |||
| 5b00d7f1f2 | |||
| 1027926be9 | |||
| 97aef3b3b1 | |||
| 12e15dc739 | |||
| 9291671fe1 | |||
| df971b1014 | |||
| cd138ae5d7 | |||
| c15e018bb1 | |||
| 00c992ff34 | |||
| 7ab212dced | |||
| 509fef6877 | |||
| 2df29a80f4 | |||
| 9b3329ff9c | |||
| ac9b2da210 | |||
| 53ef8030ca | |||
| 5f8ae401d3 | |||
| 41806782e7 | |||
| af993d1f6b | |||
| 52cf32c910 | |||
| e495f83667 | |||
| ddb42b134e | |||
| fd64529bfe | |||
| 7293718606 | |||
| df18d88d96 | |||
| 3b7bae0323 | |||
| 66a2163104 | |||
| 96fa7efee5 | |||
| 81a28b5402 | |||
| f5fa6f80b3 | |||
| 2958940463 | |||
| 644f0bf48b | |||
| f2bf2a4bcc | |||
| 8e3b8e3172 | |||
| c7f40bc111 | |||
| 9daf71417a | |||
| 94adf177ee | |||
| eff8826ca7 | |||
| 6cd80f52f3 | |||
| e1948f79d4 | |||
| e57599c3f0 | |||
| 4b5e09043d | |||
| 7a48443897 | |||
| a3f8ec0fd4 | |||
| 364ae2ca12 | |||
| 7082b086a5 | |||
| 279e39bd2b | |||
| 4ebf28b6a4 | |||
| 1d11f0b9e7 | |||
| 62ff8820dd | |||
| 4bee4ca3dd | |||
| 17a7ddee2f | |||
| 52903e281c | |||
| 9cfec546cc | |||
| e4a24f0789 | |||
| b67d2d0881 | |||
| 29f2dbdebf | |||
| 6945472e36 | |||
| ee60379138 | |||
| 42832ee6af | |||
| ec2f666344 | |||
| 065029b6a0 | |||
| 6fea3dc5f4 | |||
| 52982c0c67 | |||
| f313de1ce3 | |||
| 82204a7b06 | |||
| a435a81c8a | |||
| edbfbe40f5 | |||
| 231d734b7c | |||
| 216b130761 | |||
| c6a6e9d4b0 | |||
| dc230a8ce0 | |||
| 57a6c5aed7 | |||
| 69e40ba5c7 | |||
| c0db00e5cd | |||
| 69df04e6a6 | |||
| eb352fe34f | |||
| e3aa8ef9b8 | |||
| 6029b79885 | |||
| 1c6e5b9664 | |||
| cd99adc094 | |||
| 734b327ef0 | |||
| 471fce1f50 | |||
| 5e8e6568e9 | |||
| e0f6298d5d | |||
| 9fcb04c0b3 | |||
| 146f5055d7 | |||
| 2d14dcec7d | |||
| fe8f0acbef | |||
| c6e0f838ba | |||
| cd74b7b5ea | |||
| 9854b2a3c8 | |||
| a76027ce91 | |||
| 72316d0f96 | |||
| e9b9c788d2 | |||
| 2cfa89fb56 | |||
| d046d4848b | |||
| d7bcba730c | |||
| 8c1c24656a | |||
| 4432d6dc16 | |||
| 8780c645b7 | |||
| ff3729614e | |||
| be3307d198 | |||
| e2956efcb1 | |||
| 515b9b0ef9 | |||
| c3565499f2 | |||
| 41b5df3883 | |||
| e3bf086e49 | |||
| 25bfdc92c8 | |||
| 6df7231cfb | |||
| 5b68566b5b | |||
| 71734d87ac | |||
| 569c2f9538 | |||
| 969b0dad8d | |||
| 4b9d03772f | |||
| 0101b5dfc7 | |||
| 3ea129fa0b | |||
| c4854b8cba | |||
| e6f97126d3 | |||
| 1f27df4e9c | |||
| 597d417564 | |||
| ab7987a149 | |||
| c9f0b81855 | |||
| 109f481a6d | |||
| ddfdb2ee10 | |||
| d59160b2ce | |||
| 4014ae1dc9 | |||
| bad2d2a37a | |||
| 5f303edf30 | |||
| 4322c16e0f | |||
| 718c2746ae | |||
| 16277b2f8d | |||
| a338d8f544 | |||
| c3e3d2ec99 | |||
| 96e65ac0f6 | |||
| 7a342d11fb | |||
| 4c71f47f9b | |||
| c3ecbcef21 | |||
| 7094af67f5 | |||
| 24bbd0769e | |||
| 48beaa066e | |||
| b4cee0cd18 | |||
| d7a3517296 | |||
| 8dd04d5fb3 | |||
| 79e0e72aca | |||
| acb18c2745 | |||
| 64d8ab5e55 | |||
| 42d0dfa121 | |||
| af4a7800ce | |||
| a50ee5ee6a | |||
| b093191da5 | |||
| 7a58bbf6b4 | |||
| 868a0f174b | |||
| ef667e8409 | |||
| b16bd50f73 | |||
| 227588350d | |||
| 9a377c6e98 | |||
| 4bf0553ea7 | |||
| bcab31e047 | |||
| 2018b7b5ed | |||
| 69ae9b2c46 | |||
| c8b53bdba6 | |||
| 010c3c9f4b | |||
| 3042d8d951 | |||
| c9450422d6 | |||
| 9516391ed3 | |||
| d82c2d6d61 | |||
| ebe2777d68 | |||
| 1d7b05c607 | |||
| 9365e358dd | |||
| 9dba811236 | |||
| 131ce95ee6 | |||
| 3d665fab34 | |||
| a31cde78d9 | |||
| 84c3457a28 | |||
| c4e71656db | |||
| de1b1dca21 | |||
| 3fe73e5ba4 | |||
| 1dbeb9d143 | |||
| 1b50abbafe | |||
| 7c842eea13 | |||
| f5c138884b | |||
| bc5b0bb610 | |||
| dcd048e00a | |||
| 5f3e4ceb4d | |||
| fdca32a577 | |||
| dab0cb1ba9 | |||
| 5cd2862aab | |||
| 6c64197cdb | |||
| 0e1bc2b716 | |||
| c30d087385 | |||
| c02ad52bfd | |||
| 259d21c565 | |||
| bf804beb21 | |||
| e3af254dd6 | |||
| ac8d084924 | |||
| 3ad9565f56 | |||
| 0e1e7dcf03 | |||
| 6e5375002f | |||
| 4d9685ae0d | |||
| 3d97955f7d | |||
| 69823f7abc | |||
| 22a8ffdbe4 | |||
| ad9e6231f9 | |||
| 32c664bdaa | |||
| 664805fa4d | |||
| fd8ef079d0 | |||
| 3d400211da | |||
| 0909816af6 | |||
| 344ff7b946 | |||
| 00610a62c5 | |||
| bd4afe9f6e | |||
| 1119303d36 | |||
| ea0b0bacac | |||
| ab49392da3 | |||
| 8932d52107 | |||
| 7acf6274a4 | |||
| f14917e8d4 | |||
| c587d6b8f9 | |||
| 40239810cc | |||
| 9aba82d5d6 | |||
| cdec2159f1 | |||
| e76ebea729 | |||
| baa57f5ee4 | |||
| c43e19820d | |||
| 3325ae99a9 | |||
| c6f5def7d7 | |||
| 3475cf42d2 | |||
| efb79d1c96 | |||
| 3931953bc7 | |||
| 72441c3a27 | |||
| a953eb20e3 | |||
| 5feb628feb | |||
| 11bc6c6b69 | |||
| 484a262c31 | |||
| 1b33aedb56 | |||
| c70093d22f | |||
| 5410d92eb1 | |||
| dbf849a592 | |||
| 2b5dca48a5 | |||
| 9830160821 | |||
| 5ac53527df | |||
| 70befd69d5 | |||
| 20c552693d | |||
| 0117d6994a | |||
| 49ee02277b | |||
| 41d8ed4c78 | |||
| e00765506c | |||
| 66ec2642a4 | |||
| cec0213799 | |||
| 5b4fac652d | |||
| c4bf46e97a | |||
| b885af57b2 | |||
| 4d54b458a7 | |||
| 13f719f285 | |||
| 1c53cde453 | |||
| d2c9078fd3 | |||
| 5575ad7085 | |||
| 587e0b2bf9 | |||
| 469379de61 | |||
| 3bccd5bd6a | |||
| 668d72dfe2 | |||
| b327870fd4 | |||
| 57a94ff4f3 | |||
| 734ea2e8bc | |||
| d4db6e1432 | |||
| 1d4d524932 | |||
| aca050d47c | |||
| f34c43d56e | |||
| 843b724b6d | |||
| 118cc02c74 | |||
| 6bab0c2787 | |||
| 55e912b060 | |||
| d272722d9d | |||
| 690f06e618 | |||
| ea9d1c4fd2 | |||
| cf9e2e9c9a | |||
| 3d63fc6c2f | |||
| 99097c61f6 | |||
| b0d847ca15 | |||
| 95e93a3ab1 | |||
| e061f81beb | |||
| 94d1a67d88 | |||
| 8fe89409a5 | |||
| 29d4c9f13a | |||
| 98cb3ae80e | |||
| 288b6e6943 | |||
| 49aee8e57c | |||
| 555299ddea | |||
| a49e5c0c01 | |||
| 6eb92e6647 | |||
| b99e34bd86 | |||
| a48fd0f422 | |||
| b164b49b81 | |||
| 162eeeb5de | |||
| 7a1282a6da | |||
| 238c68d8eb | |||
| 7cc34c9072 | |||
| b2b0af95d8 | |||
| 6afb4a0220 | |||
| 50962ae9fe | |||
| 87e2d01ccb | |||
| 6625b675af | |||
| 7c16b82e70 | |||
| 72ae812aa4 | |||
| 4c3ffa617a | |||
| a5c4416bd0 | |||
| 24f67f2d87 | |||
| 580e7879d4 | |||
| 3cf5f0e086 | |||
| 18de22a8a7 | |||
| 28bcea6613 | |||
| 5755e70636 | |||
| f65a9ffec5 | |||
| 6d5c7ea855 | |||
| ae7fe1bc2e | |||
| acbce24dd9 | |||
| d0e0cf112f | |||
| 6310430e38 | |||
| 064abb30ee | |||
| 3c1b54200d | |||
| 25a0847e60 | |||
| 5f7eb6c16f | |||
| 915c05a289 | |||
| a82eb29af1 | |||
| e19f583e77 | |||
| dd31321038 | |||
| 4fd8b40f65 | |||
| 89b118e125 | |||
| b215a96f5d | |||
| eca9a105af | |||
| 814945f728 | |||
| 58d27094fa | |||
| 61cc23bda2 | |||
| d4006c4937 | |||
| fad1c30559 | |||
| 57c23537d0 | |||
| 255bdadf88 | |||
| 0312824742 | |||
| a323e03030 | |||
| c0941f9e22 | |||
| 7d13b17b1e | |||
| b1e611d7e3 | |||
| 4a57077f73 | |||
| d1903eabc7 | |||
| c093a79151 | |||
| 779e1b2bb5 | |||
| a86b0ad3fd | |||
| b55d54a417 | |||
| c5fef051f0 | |||
| 5e32fe2547 | |||
| 192314b070 | |||
| aba9c8d74d | |||
| 29ef93cbf3 | |||
| c6a273b789 | |||
| fa9d92a819 | |||
| 756d1a0a80 | |||
| 14ff4cb869 | |||
| 37b8fd1e40 | |||
| 53b878869e | |||
| d515ba9428 | |||
| 131618941c | |||
| 196312941c | |||
| d8ea9a6bca | |||
| 21af2176a6 | |||
| 358451359c | |||
| d00aae972c | |||
| 4e5e193c76 | |||
| 1c9432539a | |||
| add3a14b6e | |||
| 04ee5f8583 | |||
| 84ae76764e | |||
| 6f6205ff41 | |||
| f655c2545b | |||
| 5b38fc606c | |||
| 92663a8773 | |||
| 701dc43675 | |||
| 1bf69792ad | |||
| 6878ed9ffa | |||
| c478d2e22e | |||
| 769d46729a | |||
| 022fb23068 | |||
| 0a5ceb636c | |||
| 8e7fe5c5f2 | |||
| 15d79e8a7b | |||
| d5ab4bda33 | |||
| e790200395 | |||
| 1720ac8ac1 | |||
| 072d21135a | |||
| 8a19e37bec | |||
| a1c8874705 | |||
| 3a7448afac | |||
| 983fdfc671 | |||
| c2834e873d | |||
| dafc018b68 | |||
| bc815fd244 | |||
| e3ac0e4d09 | |||
| 6eefc8e649 | |||
| 20065e644b | |||
| 589027ebec | |||
| 6e203e7083 | |||
| f7108ddd92 | |||
| af3ea3bab3 | |||
| 4c473a17eb | |||
| 0e9fa777b3 | |||
| 0b9b4d5347 | |||
| 9f14e6e87b | |||
| 8828587084 | |||
| 687f01c84a | |||
| d07ae89f72 | |||
| bb3c7afe95 | |||
| 71c6a4f3d7 | |||
| bcd08a01ba | |||
| 8108b93058 | |||
| e7acb60253 | |||
| 985089a26d | |||
| 2dd4526531 | |||
| 20b996ab12 | |||
| d4feb51402 | |||
| ec61f5e3fb | |||
| 12b06306a3 | |||
| e94e12723f | |||
| d45016ee8a | |||
| b7514bf848 | |||
| 7a297f76bf | |||
| 54eb7b3d9f | |||
| 280548fb50 | |||
| 1a270ca088 | |||
| 455cad24eb | |||
| 7a6a82e2ca | |||
| 5fba69e328 | |||
| 708e07e594 | |||
| 9c95a7aa3a | |||
| 8cdcbe361f | |||
| 61bb5abfa2 | |||
| 422c7370a7 | |||
| 0165db7e79 | |||
| 3b192c533b | |||
| 2b609b64ec | |||
| b05dc2da73 | |||
| aa1ec60f65 | |||
| 60a251354e |
+48
-75
@@ -1,22 +1,22 @@
|
||||
# --- Based on Qt Coding Style ---
|
||||
# Generated from CLion C/C++ Code Style settings
|
||||
BasedOnStyle: LLVM
|
||||
|
||||
# --- Bracket and Indentation Behavior ---
|
||||
IndentWidth: 4
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
TabWidth: 4
|
||||
ColumnLimit: 100
|
||||
UseTab: Never
|
||||
AccessModifierOffset: -4
|
||||
|
||||
AlignAfterOpenBracket: BlockIndent
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveAssignments: None
|
||||
AlignOperands: DontAlign
|
||||
AllowAllArgumentsOnNextLine: false
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
BinPackParameters: false
|
||||
AllowShortBlocksOnASingleLine: Empty
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: None
|
||||
AllowShortIfStatementsOnASingleLine: Never
|
||||
AllowShortLambdasOnASingleLine: Empty
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakTemplateDeclarations: Yes
|
||||
BinPackArguments: false
|
||||
BinPackParameters: false
|
||||
BreakBeforeBraces: Custom
|
||||
BreakTemplateDeclarations: Yes
|
||||
BreakBeforeBinaryOperators: All
|
||||
BraceWrapping:
|
||||
AfterCaseLabel: false
|
||||
AfterClass: true
|
||||
@@ -31,68 +31,41 @@ BraceWrapping:
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: false
|
||||
SplitEmptyRecord: true
|
||||
|
||||
# --- Special: Lambdas and Short Things ---
|
||||
AllowShortFunctionsOnASingleLine: None
|
||||
AllowShortBlocksOnASingleLine: Never
|
||||
AllowShortEnumsOnASingleLine: false
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLambdasOnASingleLine: Inline
|
||||
AllowAllArgumentsOnNextLine: false
|
||||
|
||||
# --- Spaces ---
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceAfterCStyleCast: false
|
||||
Cpp11BracedListStyle: true
|
||||
SpaceBeforeCpp11BracedList: true
|
||||
SpaceBeforeRangeBasedForLoopColon: true
|
||||
SpacesBeforeTrailingComments: 2
|
||||
SpaceAfterTemplateKeyword: false
|
||||
SpaceBeforeInheritanceColon: false
|
||||
|
||||
# --- Alignment & Formatting Tweaks ---
|
||||
AlignConsecutiveAssignments:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: true
|
||||
AlignConsecutiveDeclarations:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: true
|
||||
AlignOperands: DontAlign
|
||||
BreakBeforeBinaryOperators: NonAssignment
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializers: BeforeComma
|
||||
PointerAlignment: Left
|
||||
ReferenceAlignment: Left
|
||||
|
||||
# --- Comment Style ---
|
||||
CommentPragmas: '^ IWYU pragma:'
|
||||
|
||||
# --- Namespace handling ---
|
||||
NamespaceIndentation: None
|
||||
|
||||
# --- Others ---
|
||||
SortIncludes: Never
|
||||
IncludeBlocks: Preserve
|
||||
MaxEmptyLinesToKeep: 2
|
||||
BreakInheritanceList: BeforeColon
|
||||
ColumnLimit: 100
|
||||
CompactNamespaces: false
|
||||
ContinuationIndentWidth: 4
|
||||
IndentCaseLabels: true
|
||||
IndentPPDirectives: None
|
||||
IndentWidth: 4
|
||||
InsertBraces: true
|
||||
AlignEscapedNewlines: DontAlign
|
||||
PPIndentWidth: 1
|
||||
IndentPPDirectives: AfterHash
|
||||
KeepEmptyLinesAtTheStartOfBlocks: true
|
||||
MaxEmptyLinesToKeep: 2
|
||||
NamespaceIndentation: None
|
||||
ObjCSpaceAfterProperty: false
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PackConstructorInitializers: Never
|
||||
PointerAlignment: Left
|
||||
ReflowComments: true
|
||||
|
||||
# --- Penalties (Fine-tuning when to break lines) ---
|
||||
PenaltyBreakAssignment: 80
|
||||
PenaltyBreakBeforeFirstCallParameter: 1
|
||||
PenaltyBreakComment: 60
|
||||
PenaltyBreakFirstLessLess: 120
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyBreakOpenParenthesis: 5
|
||||
PenaltyExcessCharacter: 10
|
||||
PenaltyReturnTypeOnItsOwnLine: 600
|
||||
SortIncludes: Never
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceAfterLogicalNot: false
|
||||
SpaceAfterTemplateKeyword: false
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeCpp11BracedList: true
|
||||
SpaceBeforeCtorInitializerColon: true
|
||||
SpaceBeforeInheritanceColon: false
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceBeforeRangeBasedForLoopColon: true
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 2
|
||||
SpacesInAngles: false
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInContainerLiterals: false
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
TabWidth: 4
|
||||
UseTab: Never
|
||||
|
||||
+8
-3
@@ -1,13 +1,14 @@
|
||||
---
|
||||
Checks: 'clang-diagnostic-*,clang-analyzer-*,boost-*,bugprone-*,
|
||||
performance-*,readability-*,portability-*,modernize-*,cppcoreguidelines-*,google-explicit-constructor,
|
||||
concurrency-*,-modernize-use-trailing-return-type, -modernize-use-nodiscard,-readability-identifier-length,
|
||||
-readability-redundant-access-specifiers,-readability-qualified-auto,-readability-implicit-bool-conversion,
|
||||
-cppcoreguidelines-avoid-non-const-global-variables,-cppcoreguidelines-owning-memory,-cppcoreguidelines-avoid-do-while,
|
||||
concurrency-*,-modernize-use-trailing-return-type, -modernize-use-nodiscard,
|
||||
-readability-redundant-access-specifiers,-readability-qualified-auto,
|
||||
-cppcoreguidelines-avoid-non-const-global-variables,-cppcoreguidelines-owning-memory,
|
||||
-readability-convert-member-functions-to-static,-bugprone-easily-swappable-parameters,
|
||||
-cppcoreguidelines-pro-type-static-cast-downcast'
|
||||
WarningsAsErrors: ''
|
||||
HeaderFilterRegex: ''
|
||||
AnalyzeTemporaryDtors: false
|
||||
FormatStyle: file
|
||||
User: florians
|
||||
CheckOptions:
|
||||
@@ -149,6 +150,8 @@ CheckOptions:
|
||||
value: '0'
|
||||
- key: concurrency-mt-unsafe.FunctionSet
|
||||
value: any
|
||||
- key: readability-identifier-length.IgnoredExceptionVariableNames
|
||||
value: '^[e]$'
|
||||
- key: google-readability-braces-around-statements.ShortStatementLines
|
||||
value: '1'
|
||||
- key: bugprone-reserved-identifier.AllowedIdentifiers
|
||||
@@ -203,6 +206,8 @@ CheckOptions:
|
||||
value: '4294967295'
|
||||
- key: bugprone-suspicious-missing-comma.RatioThreshold
|
||||
value: '0.200000'
|
||||
- key: readability-implicit-bool-conversion.AllowIntegerConditions
|
||||
value: 'false'
|
||||
- key: readability-identifier-length.IgnoredParameterNames
|
||||
value: '^[n]$'
|
||||
- key: readability-function-size.StatementThreshold
|
||||
|
||||
@@ -102,6 +102,3 @@ c5c2ea3498f402c0c89916c46ddb071e22756622 # Assembly: Final application of pre-co
|
||||
d472927bba7b2d8d151c99fb29cf1d8dd099ea7d # Correct PartDesign Helix feature negative angles (#11399)
|
||||
b93c02e07da4990482b9d927506901e6f5d624e1 # Black updated to 24.3.0
|
||||
cbea6b60942f8327e6105b12e8c1d5db4647984c # FEM: Apply pre-commit to FEM files
|
||||
f9d66096878c7d89c273522b9ca57bdb14fee3bc # Rearranged CommandCreateGeo.cpp
|
||||
b23d5809414d63ea90bcc744212c126645051438 # BIM: add to pre-commit and apply Black formatting
|
||||
50e4864efb06faf3e2126e8cb9ff9058a08a54b2 # Draft: add to pre-commit and apply Black formatting
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: FreeCAD
|
||||
liberapay: FreeCAD
|
||||
open_collective: freecad
|
||||
patreon: # Replace with a single Patreon username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: Report a Problem
|
||||
description: Have you found something that does not work well, is too hard to do or is missing altogether? Please create a Problem Report.
|
||||
labels: ["Status: Needs triage","Status: Needs confirmation"]
|
||||
labels: ["Status: Needs triage"]
|
||||
body:
|
||||
- type: checkboxes
|
||||
id: existing_issue
|
||||
@@ -22,7 +22,7 @@ body:
|
||||
id: full_version
|
||||
attributes:
|
||||
label: Full version info
|
||||
description: Please use the About FreeCAD dialog to copy your full version information and paste it here. Try reproducing the issue by restarting FreeCAD in safe mode too.
|
||||
description: Please use the About FreeCAD dialog to copy your full version information and paste it here.
|
||||
render: shell
|
||||
validations:
|
||||
required: true
|
||||
@@ -40,8 +40,6 @@ body:
|
||||
- Expressions
|
||||
- FEM
|
||||
- File formats
|
||||
- Material
|
||||
- Measurement
|
||||
- Mesh
|
||||
- OpenSCAD
|
||||
- Part
|
||||
|
||||
+1
-26
@@ -1,6 +1,4 @@
|
||||
aci
|
||||
addmin
|
||||
afile
|
||||
ake
|
||||
aline
|
||||
alle
|
||||
@@ -8,23 +6,19 @@ alledges
|
||||
alocation
|
||||
anid
|
||||
anormal
|
||||
anull
|
||||
apoints
|
||||
aply
|
||||
appy
|
||||
ascript
|
||||
ba
|
||||
beginn
|
||||
bloaded
|
||||
bottome
|
||||
brushin
|
||||
childrens
|
||||
childs
|
||||
connexion
|
||||
currenty
|
||||
curvelinear
|
||||
detet
|
||||
documentin
|
||||
doubleclick
|
||||
dum
|
||||
eiter
|
||||
@@ -34,28 +28,18 @@ finde
|
||||
findn
|
||||
fle
|
||||
fo
|
||||
fpt
|
||||
freez
|
||||
froms
|
||||
graphin
|
||||
hist
|
||||
incrementin
|
||||
indexin
|
||||
indicies
|
||||
indx
|
||||
inout
|
||||
invertin
|
||||
isnt
|
||||
ist
|
||||
itsel
|
||||
leadin
|
||||
linez
|
||||
localy
|
||||
lod
|
||||
mantatory
|
||||
mata
|
||||
methode
|
||||
mke
|
||||
modell
|
||||
nd
|
||||
nin
|
||||
@@ -65,30 +49,21 @@ numer
|
||||
oce
|
||||
ontop
|
||||
ot
|
||||
pard
|
||||
parm
|
||||
parms
|
||||
pointin
|
||||
programm
|
||||
propt
|
||||
rady
|
||||
recurrance
|
||||
rin
|
||||
rougly
|
||||
sectionin
|
||||
seh
|
||||
ser
|
||||
sergent
|
||||
serie
|
||||
shs
|
||||
siz
|
||||
som
|
||||
strack
|
||||
strin
|
||||
substraction
|
||||
sur
|
||||
te
|
||||
textin
|
||||
thist
|
||||
tread
|
||||
ue
|
||||
@@ -99,4 +74,4 @@ vas
|
||||
vertexes
|
||||
vew
|
||||
wallthickness
|
||||
zuser
|
||||
zuser
|
||||
@@ -1,11 +0,0 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: github-actions
|
||||
directory: /
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: pip
|
||||
directory: /
|
||||
schedule:
|
||||
interval: daily
|
||||
+1
-9
@@ -80,13 +80,9 @@
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/Mod/Spreadsheet/**/*']
|
||||
|
||||
"Mod: Start":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/Mod/Start/**/*']
|
||||
|
||||
"Mod: Surface":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/Mod/Surface/**/*']
|
||||
- any-glob-to-any-file: ['src/Mod/Surface/**/*/']
|
||||
|
||||
"Mod: TechDraw":
|
||||
- changed-files:
|
||||
@@ -102,10 +98,6 @@
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['cMake/**/*']
|
||||
|
||||
"3rd party component":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/3rdParty/**/*']
|
||||
|
||||
# 'Topic' related labels
|
||||
|
||||
"Topic: Stylesheets":
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "black-warning",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"owner": "black-warning",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(would reformat (.*))$",
|
||||
"file": 2,
|
||||
"message": 1
|
||||
}
|
||||
]
|
||||
"regexp": "^(would reformat (.*))$",
|
||||
"file": 2,
|
||||
"message": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "clang",
|
||||
"pattern": [
|
||||
{
|
||||
"owner": "clang",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+):([0-9]+):([0-9]+): (error|warning|note): (.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"severity": 4,
|
||||
"message": 5
|
||||
}
|
||||
]
|
||||
"regexp": "^(.+):([0-9]+):([0-9]+): (error|warning|note): (.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"severity": 4,
|
||||
"message": 5
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "codespell-matcher",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"owner": "codespell-matcher",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+):(\\d+):\\s+(.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"message": 3
|
||||
}
|
||||
]
|
||||
"regexp": "^(.+):(\\d+):\\s+(.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"message": 3
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "cpplint",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"owner": "cpplint",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+):([0-9]+): (.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"message": 3
|
||||
}
|
||||
]
|
||||
"regexp": "^(.+):([0-9]+): (.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"message": 3
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "grepMatcher-warning",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"owner": "grepMatcher-warning",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+):([0-9]+):(.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"message": 3
|
||||
}
|
||||
]
|
||||
"regexp": "^(.+):([0-9]+):(.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"message": 3
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"__comment":
|
||||
"Taken from vscode's vs/workbench/contrib/tasks/common/problemMatcher.ts msCompile rule",
|
||||
"__comment": "Taken from vscode's vs/workbench/contrib/tasks/common/problemMatcher.ts msCompile rule",
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "msvc-problem-matcher",
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "pylint-error",
|
||||
"severity": "error",
|
||||
"pattern": [
|
||||
{
|
||||
"owner": "pylint-error",
|
||||
"severity": "error",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+?):([0-9]+):([0-9]+): ([([E|F][0-9]+): (.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"code": 4,
|
||||
"message": 5
|
||||
}
|
||||
]
|
||||
"regexp": "^(.+?):([0-9]+):([0-9]+): ([([E|F][0-9]+): (.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"code": 4,
|
||||
"message": 5
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "pylint-warning",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"owner": "pylint-warning",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+?):([0-9]+):([0-9]+): ([^E|F][0-9]+): (.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"code": 4,
|
||||
"message": 5
|
||||
}
|
||||
]
|
||||
"regexp": "^(.+?):([0-9]+):([0-9]+): ([^E|F][0-9]+): (.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"code": 4,
|
||||
"message": 5
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
<!-- Include a brief summary of the changes. -->
|
||||
|
||||
<!--
|
||||
The FreeCAD community thanks you for your contribution!
|
||||
By creating a Pull Request you agree to the contributing policy. The complete policy can be found in the root of the source tree (CONTRIBUTING.md) or at https://github.com/FreeCAD/FreeCAD/blob/main/CONTRIBUTING.md
|
||||
|
||||
This template provides guidance on creating a PR that can be reviewed and approved as quickly as possible. Comments may be safely deleted.
|
||||
|
||||
Unless you know exactly what you're doing, please leave the checkbox 'Allow edits by maintainers' enabled. This will allow maintainers to help you.
|
||||
-->
|
||||
|
||||
## Issues
|
||||
<!-- link to individual issues this PR closes by referencing the issue number (e.g., fixes #1234, closes #4321). -->
|
||||
|
||||
## Before and After Images
|
||||
<!-- If your proposed changes affect the FreeCAD GUI, add before and after screenshots -->
|
||||
|
||||
|
||||
|
||||
<!-- Notes on the PR Review Process
|
||||
|
||||
The following section describes what the maintainers consider when reviewing your Pull Request. These items may not require you to take any action. This information is provided for context. Understanding what we consider will help you prepare your request for speedy approval.
|
||||
|
||||
You can find additional documentation about these guidelines in the [Developers handbook](https://freecad.github.io/DevelopersHandbook).
|
||||
|
||||
Alignment (Does the PR align with the goals and interests of the project?)
|
||||
- Does the PR have at least one issue linked, which this PR closes?
|
||||
- Has the conversation on the PR and related issue(s) reached consensus?
|
||||
- If the PR affects the GUI, is the Design Working Group (DWG) aware and have they had time to review and comment?
|
||||
- If the PR affects the GUI, did the contributor include before/after images?
|
||||
- If the PR affects standards and workflow, is the CAD Working Group (CWG) aware and have they had time to review/comment?
|
||||
|
||||
Impact (Does the change affect other parts of the project?)
|
||||
- Has the impact on documentation been considered and appropriate action taken?
|
||||
- Has the impact on translation been considered appropriate action taken?
|
||||
- Will the PR affect existing user documents?
|
||||
|
||||
Code Quality (Is code well-written and maintainable?)
|
||||
- Does the PR warrant a review by the Code Quality Working Group (CQWG)?
|
||||
- Does the change include tests?
|
||||
- Is the PR rebased on the current main branch with unnecessary commits squashed?
|
||||
|
||||
Release (Are there considerations related to release timing?)
|
||||
- Has the PR been considered for backporting to the latest release branch?
|
||||
- Have the release notes been considered/updated?
|
||||
-->
|
||||
@@ -1,168 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
"""
|
||||
run_gui_tests.py
|
||||
|
||||
List registered tests via `FreeCAD -t`, filter for GUI tests (names containing 'Gui'), and run each
|
||||
GUI test module using the specified FreeCAD executable.
|
||||
|
||||
Usage:
|
||||
run_gui_tests.py [FREECAD_EXEC]
|
||||
|
||||
If FREECAD_EXEC is omitted the script falls back to 'FreeCAD' on PATH.
|
||||
If FREECAD_EXEC is a directory containing bin/FreeCAD, that binary is used.
|
||||
If FREECAD_EXEC is an executable path, it is used directly.
|
||||
|
||||
This script returns 0 if all GUI modules run successfully. Otherwise it returns the last non-zero
|
||||
exit code.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
import sys
|
||||
import subprocess
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def find_executable(arg: str | None) -> str:
|
||||
"""Return the FreeCAD executable path to use.
|
||||
|
||||
If `arg` is None or empty, returns the plain name 'FreeCAD' which will be looked up on PATH. If
|
||||
`arg` is a directory and contains `bin/FreeCAD` that binary will be returned. If `arg` is a file
|
||||
path it is returned as-is. Otherwise the original argument is returned.
|
||||
|
||||
Common use cases: use the FreeCAD binary from a build directory or an installed FreeCAD prefix.
|
||||
"""
|
||||
if not arg:
|
||||
return "FreeCAD"
|
||||
p = Path(arg)
|
||||
if p.is_dir():
|
||||
candidate = p / "bin" / "FreeCAD"
|
||||
if candidate.exists():
|
||||
return str(candidate)
|
||||
if p.is_file():
|
||||
return str(p)
|
||||
# fallback: return as-is (may be on PATH)
|
||||
return arg
|
||||
|
||||
|
||||
def validate_executable(path: str) -> tuple[bool, str]:
|
||||
"""Return (ok, message). Checks if the executable exists or is likely on PATH.
|
||||
|
||||
This is best effort: if a bare name is given (e.g. 'FreeCAD') we can't stat it here, so we
|
||||
accept it but warn. If the path points to a file, we check executability. Also warn if the name
|
||||
looks like the CLI-only 'FreeCADCmd'.
|
||||
"""
|
||||
p = Path(path)
|
||||
if p.is_file():
|
||||
if not os.access(str(p), os.X_OK):
|
||||
return False, f"File exists but is not executable: {path}"
|
||||
if p.name.endswith("FreeCADCmd"):
|
||||
return (
|
||||
True,
|
||||
(
|
||||
"Warning: executable looks like 'FreeCADCmd' (CLI); GUI tests require the GUI "
|
||||
"binary 'FreeCAD'."
|
||||
),
|
||||
)
|
||||
return True, ""
|
||||
# Bare name or non-existent path: accept but warn
|
||||
if p.name.endswith("FreeCADCmd"):
|
||||
return (
|
||||
True,
|
||||
(
|
||||
"Warning: executable name looks like 'FreeCADCmd' (CLI); GUI tests require the GUI "
|
||||
"binary 'FreeCAD'."
|
||||
),
|
||||
)
|
||||
return True, ""
|
||||
|
||||
|
||||
def run_and_capture(cmd: list[str]) -> tuple[int, str]:
|
||||
"""Run `cmd` and return (returncode, combined stdout+stderr string).
|
||||
|
||||
If the executable is not found a return code of 127 is returned and a small error string is
|
||||
provided as output to aid diagnosis.
|
||||
"""
|
||||
try:
|
||||
proc = subprocess.run(
|
||||
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, check=False
|
||||
)
|
||||
return proc.returncode, proc.stdout
|
||||
except FileNotFoundError:
|
||||
return 127, f"Executable not found: {cmd[0]}\n"
|
||||
|
||||
|
||||
def parse_registered_tests(output: str) -> list[str]:
|
||||
"""Parse output from `FreeCAD -t` and return a list of registered test unit names.
|
||||
|
||||
The function looks for the section starting with the literal 'Registered test units:' and
|
||||
then collects non-empty, stripped lines from that point onwards as test names.
|
||||
"""
|
||||
lines = output.splitlines()
|
||||
tests: list[str] = []
|
||||
started = False
|
||||
for ln in lines:
|
||||
if not started:
|
||||
if "Registered test units:" in ln:
|
||||
started = True
|
||||
continue
|
||||
s = ln.strip()
|
||||
if not s:
|
||||
# allow blank lines but keep going
|
||||
continue
|
||||
tests.append(s)
|
||||
return tests
|
||||
|
||||
|
||||
def main(argv: list[str]) -> int:
|
||||
"""Entry point: run GUI test modules registered in the FreeCAD executable.
|
||||
|
||||
Returns the last non-zero exit code from any GUI test module, or 0 on success.
|
||||
"""
|
||||
exec_arg = argv[1] if len(argv) > 1 else None
|
||||
freecad_exec = find_executable(exec_arg)
|
||||
|
||||
print(f"Using FreeCAD executable: {freecad_exec}")
|
||||
|
||||
ok, msg = validate_executable(freecad_exec)
|
||||
if msg:
|
||||
print(msg, file=sys.stderr)
|
||||
if not ok:
|
||||
print(f"Aborting: invalid FreeCAD executable: {freecad_exec}", file=sys.stderr)
|
||||
return 3
|
||||
|
||||
code, out = run_and_capture([freecad_exec, "-t"])
|
||||
if code != 0:
|
||||
print(
|
||||
f"Warning: listing tests returned exit code {code}; attempting to parse output anyway",
|
||||
file=sys.stderr,
|
||||
)
|
||||
|
||||
tests = parse_registered_tests(out)
|
||||
if not tests:
|
||||
print("No registered tests found; exiting with success.")
|
||||
return 0
|
||||
|
||||
gui_tests = [t for t in tests if "Gui" in t]
|
||||
if not gui_tests:
|
||||
print("No GUI tests found in registered tests; nothing to run.")
|
||||
return 0
|
||||
|
||||
print("Found GUI test modules:")
|
||||
for t in gui_tests:
|
||||
print(" ", t)
|
||||
|
||||
last_rc = 0
|
||||
for mod in gui_tests:
|
||||
print(f"\nRunning GUI tests for module: {mod}")
|
||||
rc, out = run_and_capture([freecad_exec, "-t", mod])
|
||||
print(out)
|
||||
if rc != 0:
|
||||
print(f"Module {mod} exited with code {rc}", file=sys.stderr)
|
||||
last_rc = rc
|
||||
|
||||
return last_rc
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main(sys.argv))
|
||||
@@ -57,11 +57,6 @@ jobs:
|
||||
env:
|
||||
logdir: /tmp/log/
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Make needed directories
|
||||
run: |
|
||||
mkdir -p ${{ env.logdir }}
|
||||
@@ -108,7 +103,7 @@ jobs:
|
||||
done
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ github.job }}-Logs
|
||||
path: |
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
name: FreeCAD master CI
|
||||
|
||||
on: [workflow_dispatch, push, pull_request, merge_group]
|
||||
on: [workflow_dispatch, push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: FC-CI-${{ github.head_ref || github.run_id }}
|
||||
@@ -45,11 +45,23 @@ jobs:
|
||||
with:
|
||||
artifactBasename: Pixi-${{ github.run_id }}
|
||||
|
||||
Ubuntu:
|
||||
MacOS_13_Conda_Apple:
|
||||
needs: [Prepare]
|
||||
uses: ./.github/workflows/sub_buildUbuntu.yml
|
||||
uses: ./.github/workflows/sub_buildMacOSCondaApple.yml
|
||||
with:
|
||||
artifactBasename: Ubuntu-${{ github.run_id }}
|
||||
artifactBasename: MacOS_13_Conda_Apple-${{ github.run_id }}
|
||||
|
||||
Ubuntu_20-04:
|
||||
needs: [Prepare]
|
||||
uses: ./.github/workflows/sub_buildUbuntu2004.yml
|
||||
with:
|
||||
artifactBasename: Ubuntu_20-04-${{ github.run_id }}
|
||||
|
||||
Ubuntu_24-04_Conda:
|
||||
needs: [Prepare]
|
||||
uses: ./.github/workflows/sub_buildUbuntu2404Conda.yml
|
||||
with:
|
||||
artifactBasename: Ubuntu_24-04_Conda-${{ github.run_id }}
|
||||
|
||||
Windows:
|
||||
needs: [Prepare]
|
||||
@@ -63,17 +75,16 @@ jobs:
|
||||
with:
|
||||
artifactBasename: Lint-${{ github.run_id }}
|
||||
changedFiles: ${{ needs.Prepare.outputs.changedFiles }}
|
||||
changedLines: ${{ needs.Prepare.outputs.changedLines }}
|
||||
changedCppFiles: ${{ needs.Prepare.outputs.changedCppFiles }}
|
||||
changedCppLines: ${{ needs.Prepare.outputs.changedCppLines }}
|
||||
changedPythonFiles: ${{ needs.Prepare.outputs.changedPythonFiles }}
|
||||
changedPythonLines: ${{ needs.Prepare.outputs.changedPythonLines }}
|
||||
|
||||
WrapUp:
|
||||
needs: [
|
||||
Prepare,
|
||||
Pixi,
|
||||
Ubuntu,
|
||||
MacOS_13_Conda_Apple,
|
||||
Ubuntu_20-04,
|
||||
Ubuntu_24-04_Conda,
|
||||
Windows,
|
||||
Lint
|
||||
]
|
||||
|
||||
@@ -47,27 +47,13 @@ runs:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Assembly_tests_run --gtest_output=json:${{ inputs.reportdir }}assembly_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}assembly_gtest_test_log.txt
|
||||
testName: Assembly
|
||||
- name: C++ app tests
|
||||
id: app
|
||||
- name: C++ core tests
|
||||
id: core
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/App_tests_run --gtest_output=json:${{ inputs.reportdir }}app_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}app_gtest_test_log.txt
|
||||
testName: App
|
||||
- name: C++ base tests
|
||||
id: base
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Base_tests_run --gtest_output=json:${{ inputs.reportdir }}base_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}base_gtest_test_log.txt
|
||||
testName: Base
|
||||
- name: C++ Gui tests
|
||||
id: gui
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Gui_tests_run --gtest_output=json:${{ inputs.reportdir }}gui_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}gui_gtest_test_log.txt
|
||||
testName: Gui
|
||||
testCommand: ${{ inputs.builddir }}/tests/Tests_run --gtest_output=json:${{ inputs.reportdir }}core_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}core_gtest_test_log.txt
|
||||
testName: Core
|
||||
- name: C++ Material tests
|
||||
id: material
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
@@ -96,13 +82,6 @@ runs:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Mesh_tests_run --gtest_output=json:${{ inputs.reportdir }}meshpart_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}meshpart_gtest_test_log.txt
|
||||
testName: MeshPart
|
||||
- name: C++ Misc tests
|
||||
id: misc
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Misc_tests_run --gtest_output=json:${{ inputs.reportdir }}misc_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}misc_gtest_test_log.txt
|
||||
testName: Misc
|
||||
- name: C++ Part tests
|
||||
id: part
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
@@ -138,13 +117,6 @@ runs:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Sketcher_tests_run --gtest_output=json:${{ inputs.reportdir }}spreadsheet_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}spreadsheet_gtest_test_log.txt
|
||||
testName: Spreadsheet
|
||||
- name: C++ Start tests
|
||||
id: start
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Start_tests_run --gtest_output=json:${{ inputs.reportdir }}start_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}start_gtest_test_log.txt
|
||||
testName: Start
|
||||
- name: Compose summary report based on test results
|
||||
if: always()
|
||||
shell: bash -l {0}
|
||||
|
||||
@@ -41,11 +41,11 @@ inputs:
|
||||
libpackdownloadurl:
|
||||
description: "URL where to download libpack"
|
||||
required: false
|
||||
default: https://github.com/FreeCAD/FreeCAD-LibPack/releases/download/3.1.1.3/LibPack-1.1.0-v3.1.1.3-Release.7z
|
||||
default: https://github.com/FreeCAD/FreeCAD-LibPack/releases/download/3.0.0RC4/LibPack-1.0.0-v3.0.0RC4-Release.7z
|
||||
libpackname:
|
||||
description: "Libpack name (once downloaded)"
|
||||
required: false
|
||||
default: LibPack-1.1.0-v3.1.1.3-Release
|
||||
default: LibPack-1.0.0-v3.0.0RC4-Release
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
|
||||
@@ -1,133 +0,0 @@
|
||||
# This workflow warns and then closes issues that have had no activity for a
|
||||
# specified amount of time. You can adjust the behavior by modifying this file.
|
||||
# For more information, see:
|
||||
# https://github.com/marketplace/actions/close-stale-issues
|
||||
# https://github.com/actions/stale/blob/master/action.yml
|
||||
# https://github.com/actions/stale
|
||||
---
|
||||
name: 'Stale Issues'
|
||||
on: # yamllint disable-line rule:truthy
|
||||
schedule:
|
||||
- cron: '0 0 * * *' # Run at 00:00 UTC every day
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write # for actions/stale to close stale issues
|
||||
pull-requests: write # for actions/stale to close stale pull requests
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: '🧹 Tag & close stale unconfirmed bugs'
|
||||
id: stale_issues
|
||||
uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v10.1.0
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
days-before-issue-stale: 60
|
||||
days-before-issue-close: 14
|
||||
days-before-pr-stale: -1
|
||||
days-before-pr-close: -1
|
||||
operations-per-run: 100 # max num of ops per run
|
||||
stale-issue-label: 'Status: Stale'
|
||||
close-issue-label: 'Status: Auto-closing'
|
||||
exempt-issue-labels: 'Status: Confirmed,Priority: High,Priority: Critical,Blocker,Type: Feature,no-auto-close'
|
||||
remove-stale-when-updated: true
|
||||
ascending: true
|
||||
stale-issue-message: |
|
||||
Hi! This issue hasn’t seen activity in a while. If it’s still relevant, please update to the latest FreeCAD weekly build [download here](https://github.com/FreeCAD/FreeCAD/releases/) to see if the problem is resolved.
|
||||
|
||||
If the issue persists, let us know by adding a comment with any updates or details. Otherwise, we’ll close this issue automatically in 14 days to keep our backlog tidy. Feel free to comment anytime to keep it open. Closed issues can always be reopened.
|
||||
Thanks for helping improve FreeCAD!
|
||||
|
||||
Access additional [FreeCAD](https://freecad.org) resources:
|
||||
- **Forum**: https://forum.freecad.org
|
||||
- **Blog**: https://blog.freecad.org
|
||||
- **Wiki**: https://wiki.freecad.org
|
||||
|
||||
- name: '🧹 Close stale requested feedback issues'
|
||||
id: awaiting_issues
|
||||
uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v10.1.0
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
days-before-issue-stale: 20
|
||||
days-before-issue-close: 14
|
||||
days-before-pr-stale: -1
|
||||
days-before-pr-close: -1
|
||||
operations-per-run: 100 # max num of ops per run
|
||||
stale-issue-label: 'Status: Stale'
|
||||
close-issue-label: 'Status: Auto-closing'
|
||||
only-labels: 'Status: Needs feedback,Status: Needs test on dev version,Status: Needs steps to reproduce'
|
||||
remove-stale-when-updated: true
|
||||
ascending: true
|
||||
stale-issue-message: |
|
||||
Hi! This issue hasn’t seen activity in a while despite the need for further feedback.
|
||||
If it’s still relevant, please update to the latest FreeCAD weekly build [download here](https://github.com/FreeCAD/FreeCAD/releases/) to see if the problem is resolved.
|
||||
|
||||
If the issue persists, let us know by adding a comment with any updates or details. Otherwise, we’ll close this issue automatically in 14 days to keep our backlog tidy. Feel free to comment anytime to keep it open. Closed issues can always be reopened.
|
||||
Thanks for helping improve FreeCAD!
|
||||
|
||||
Access additional [FreeCAD](https://freecad.org) resources:
|
||||
- **Forum**: https://forum.freecad.org
|
||||
- **Blog**: https://blog.freecad.org
|
||||
- **Wiki**: https://wiki.freecad.org
|
||||
|
||||
- name: '🧹 Tag & close inactive issues'
|
||||
id: inactive_issues
|
||||
uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v10.1.0
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
days-before-issue-stale: 190
|
||||
days-before-issue-close: 60
|
||||
days-before-pr-stale: -1
|
||||
days-before-pr-close: -1
|
||||
operations-per-run: 50 # max num of ops per run
|
||||
stale-issue-label: 'Status: Stale'
|
||||
close-issue-label: 'Status: Auto-closing'
|
||||
exempt-issue-labels: 'Priority: High,Priority: Critical,Blocker,Type: Feature,no-auto-close'
|
||||
remove-stale-when-updated: true
|
||||
ascending: true
|
||||
stale-issue-message: |
|
||||
Hi! This issue hasn’t seen activity in a while. We automatically check each issue after 190 days without activity to keep the backlog tidy.
|
||||
If it’s still relevant, please update to the latest FreeCAD weekly build [download here](https://github.com/FreeCAD/FreeCAD/releases/) to see if the issue is already resolved.
|
||||
|
||||
If the issue is still relevant, let us know by adding a comment.
|
||||
Otherwise, we’ll close this issue automatically in 60 days.
|
||||
|
||||
Feel free to comment anytime to keep it open. Closed issues can always be reopened.
|
||||
Thanks for helping improve FreeCAD!
|
||||
|
||||
Access additional [FreeCAD](https://freecad.org) resources:
|
||||
- **Forum**: https://forum.freecad.org
|
||||
- **Blog**: https://blog.freecad.org
|
||||
- **Wiki**: https://wiki.freecad.org
|
||||
|
||||
- name: '🧹 Tag & close inactive PRs'
|
||||
id: inactive_pr
|
||||
uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v10.1.0
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
days-before-issue-stale: -1
|
||||
days-before-issue-close: -1
|
||||
days-before-pr-stale: 120
|
||||
days-before-pr-close: 60
|
||||
operations-per-run: 30 # max num of ops per run
|
||||
stale-pr-label: 'Status: Stale'
|
||||
close-pr-label: 'Status: Auto-closing'
|
||||
exempt-pr-labels: 'Needs backport,Priority: High,Priority: Critical,no-auto-close'
|
||||
remove-stale-when-updated: true
|
||||
ascending: true
|
||||
stale-pr-message: |
|
||||
Thanks for helping improve FreeCAD!
|
||||
This pull request hasn’t seen activity in a while. We automatically check each PR after 120 days without activity to keep the repository tidy.
|
||||
|
||||
If the PR is still relevant, let us know by adding a comment.
|
||||
Otherwise, we’ll close this PR automatically in 60 days.
|
||||
|
||||
If you would like to keep working on this pull request, we advice to rebase it on current main branch, ask feedback from users or maintainers and engage with the community to get it forward.
|
||||
@@ -1,50 +0,0 @@
|
||||
name: Backport merged pull request
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [closed, labeled]
|
||||
branches: [main, releases/*]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
backport:
|
||||
name: Create backport pull request
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Run the action if a PR is merged with backport labels
|
||||
# OR
|
||||
# when already merged PR is labeled with backport labels
|
||||
if: >
|
||||
github.event.pull_request.merged
|
||||
&& (
|
||||
github.event.action == 'closed'
|
||||
|| (
|
||||
github.event.action == 'labeled'
|
||||
&& startsWith(github.event.label.name, 'backport ')
|
||||
)
|
||||
)
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Create backport pull requests
|
||||
uses: korthout/backport-action@d07416681cab29bf2661702f925f020aaa962997 # v3.4.1
|
||||
with:
|
||||
# Inputs documented here: https://github.com/korthout/backport-action?tab=readme-ov-file#inputs
|
||||
github_token: ${{ github.token }}
|
||||
github_workspace: ${{ github.workspace }}
|
||||
|
||||
# permit PRs with merge commits to be backported
|
||||
merge_commits: 'skip'
|
||||
|
||||
# copy labels to backport to identify affected systems and priorities
|
||||
copy_labels_pattern: '.*'
|
||||
|
||||
# Regex pattern to match github labels
|
||||
# The capture group catches the target branch
|
||||
# i.e. label "backport releases/FreeCAD-1-0" will create backport
|
||||
# PR for branch releases/FreeCAD-1-0
|
||||
label_pattern: ^backport ([^ ]+)$
|
||||
@@ -1,127 +0,0 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL Advanced"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
schedule:
|
||||
- cron: '28 12 * * 6'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze (${{ matrix.language }})
|
||||
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
||||
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
||||
# - https://gh.io/supported-runners-and-hardware-resources
|
||||
# - https://gh.io/using-larger-runners (GitHub.com only)
|
||||
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
|
||||
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
|
||||
permissions:
|
||||
# required for all workflows
|
||||
security-events: write
|
||||
|
||||
# required to fetch internal or private CodeQL packs
|
||||
packages: read
|
||||
|
||||
# only required for workflows in private repositories
|
||||
actions: read
|
||||
contents: read
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- language: actions
|
||||
build-mode: none
|
||||
# - language: c-cpp
|
||||
# build-mode: autobuild
|
||||
# - language: javascript-typescript
|
||||
# build-mode: none
|
||||
- language: python
|
||||
build-mode: none
|
||||
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
|
||||
# Use `c-cpp` to analyze code written in C, C++ or both
|
||||
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
|
||||
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
|
||||
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
|
||||
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
|
||||
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
|
||||
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
fetch-depth: 2
|
||||
submodules: recursive
|
||||
|
||||
# Add any setup steps before running the `github/codeql-action/init` action.
|
||||
# This includes steps like installing compilers or runtimes (`actions/setup-node`
|
||||
# or others). This is typically only required for manual builds.
|
||||
# - name: Setup runtime (example)
|
||||
# uses: actions/setup-example@v1
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
build-mode: ${{ matrix.build-mode }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
|
||||
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||
# queries: security-extended
|
||||
queries: security-and-quality
|
||||
|
||||
# Change the CodeQL Bundle version
|
||||
# tools: https://github.com/github/codeql-action/releases/download/codeql-bundle-v2.20.7/codeql-bundle-linux64.tar.gz
|
||||
|
||||
# Add exclusions
|
||||
config: |
|
||||
paths-ignore:
|
||||
- src/Mod/Import/App/SCL_output/**
|
||||
query-filters:
|
||||
- exclude:
|
||||
id: py/file-not-closed
|
||||
|
||||
# If the analyze step fails for one of the languages you are analyzing with
|
||||
# "We were unable to automatically build your code", modify the matrix above
|
||||
# to set the build mode to "manual" for that language. Then modify this step
|
||||
# to build your code.
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||
- if: matrix.build-mode == 'manual'
|
||||
shell: bash
|
||||
run: |
|
||||
echo 'If you are using a "manual" build mode for one or more of the' \
|
||||
'languages you are analyzing, replace this with the commands to build' \
|
||||
'your code, for example:'
|
||||
echo ' make bootstrap'
|
||||
echo ' make release'
|
||||
exit 1
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
||||
@@ -1,163 +0,0 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL Advanced (c-cpp)"
|
||||
|
||||
on:
|
||||
# push:
|
||||
# branches: [ "main" ]
|
||||
# pull_request:
|
||||
# branches: [ "main" ]
|
||||
schedule:
|
||||
- cron: '28 12 * * 6'
|
||||
workflow_dispatch: # Allow manual triggers
|
||||
|
||||
env:
|
||||
CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: false
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze (${{ matrix.language }})
|
||||
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
||||
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
||||
# - https://gh.io/supported-runners-and-hardware-resources
|
||||
# - https://gh.io/using-larger-runners (GitHub.com only)
|
||||
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
|
||||
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
|
||||
permissions:
|
||||
# required for all workflows
|
||||
security-events: write
|
||||
|
||||
# required to fetch internal or private CodeQL packs
|
||||
packages: read
|
||||
|
||||
# only required for workflows in private repositories
|
||||
actions: read
|
||||
contents: read
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
# - language: actions
|
||||
# build-mode: none
|
||||
- language: c-cpp
|
||||
build-mode: autobuild
|
||||
# - language: javascript-typescript
|
||||
# build-mode: none
|
||||
# - language: python
|
||||
# build-mode: none
|
||||
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
|
||||
# Use `c-cpp` to analyze code written in C, C++ or both
|
||||
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
|
||||
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
|
||||
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
|
||||
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
|
||||
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
|
||||
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
# prevent running out of disk space on Ubuntu runners.
|
||||
- name: Maximize build space
|
||||
uses: AdityaGarg8/remove-unwanted-software@90e01b21170618765a73370fcc3abbd1684a7793 # v5
|
||||
with:
|
||||
verbose: 'true'
|
||||
remove-android: 'true' # (frees ~9 GB)
|
||||
remove-cached-tools: 'true' # (frees ~8.3 GB)
|
||||
remove-haskell: 'true' # (frees ~5.2 GB)
|
||||
remove-swapfile: 'true' # (frees ~4 GB)
|
||||
remove-docker-images: 'true' # (frees ~3.2 GB)
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
fetch-depth: 2
|
||||
submodules: recursive
|
||||
|
||||
# Install FreeCAD dependencies (cpp)
|
||||
- name: Setup build environment
|
||||
run: ./package/ubuntu/install-apt-packages.sh
|
||||
|
||||
# Add any setup steps before running the `github/codeql-action/init` action.
|
||||
# This includes steps like installing compilers or runtimes (`actions/setup-node`
|
||||
# or others). This is typically only required for manual builds.
|
||||
# - name: Setup runtime (example)
|
||||
# uses: actions/setup-example@v1
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
build-mode: ${{ matrix.build-mode }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
|
||||
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||
# queries: security-extended
|
||||
queries: security-and-quality
|
||||
|
||||
# Change the CodeQL Bundle version
|
||||
# tools: https://github.com/github/codeql-action/releases/download/codeql-bundle-v2.20.7/codeql-bundle-linux64.tar.gz
|
||||
|
||||
# If the analyze step fails for one of the languages you are analyzing with
|
||||
# "We were unable to automatically build your code", modify the matrix above
|
||||
# to set the build mode to "manual" for that language. Then modify this step
|
||||
# to build your code.
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||
- if: matrix.build-mode == 'manual'
|
||||
shell: bash
|
||||
run: |
|
||||
echo 'If you are using a "manual" build mode for one or more of the' \
|
||||
'languages you are analyzing, replace this with the commands to build' \
|
||||
'your code, for example:'
|
||||
echo ' make bootstrap'
|
||||
echo ' make release'
|
||||
exit 1
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
||||
output: sarif-results
|
||||
upload: failure-only
|
||||
|
||||
- name: filter-sarif
|
||||
uses: advanced-security/filter-sarif@v1
|
||||
with:
|
||||
patterns: |
|
||||
-tests/**/*
|
||||
-src/3rdParty/**/*
|
||||
-**/ui_*.h
|
||||
-**/moc_*.cpp
|
||||
input: sarif-results/cpp.sarif
|
||||
output: sarif-results/cpp.sarif
|
||||
|
||||
- name: Upload SARIF
|
||||
uses: github/codeql-action/upload-sarif@v3
|
||||
with:
|
||||
sarif_file: sarif-results/cpp.sarif
|
||||
|
||||
- name: Upload loc as a Build Artifact
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: sarif-results
|
||||
path: sarif-results
|
||||
retention-days: 1
|
||||
@@ -1,27 +0,0 @@
|
||||
# Dependency Review Action
|
||||
#
|
||||
# This Action will scan dependency manifest files that change as part of a Pull Request,
|
||||
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
|
||||
# Once installed, if the workflow run is marked as required,
|
||||
# PRs introducing known-vulnerable packages will be blocked from merging.
|
||||
#
|
||||
# Source repository: https://github.com/actions/dependency-review-action
|
||||
name: 'Dependency Review'
|
||||
on: [pull_request]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
dependency-review:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: 'Checkout Repository'
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
- name: 'Dependency Review'
|
||||
uses: actions/dependency-review-action@56339e523c0409420f6c2c9a2f4292bbb3c07dd3 # v4
|
||||
@@ -1,30 +0,0 @@
|
||||
name: Fedora Daily Build
|
||||
permissions:
|
||||
contents: read
|
||||
on:
|
||||
schedule:
|
||||
- cron: "00 00 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
trigger-copr-build:
|
||||
env:
|
||||
copr_token: ${{ secrets.COPR_TOKEN }}
|
||||
runs-on: ubuntu-latest
|
||||
container: quay.io/packit/packit
|
||||
steps:
|
||||
- name: setup copr token
|
||||
run: |
|
||||
mkdir -p ~/.config
|
||||
echo "$copr_token" > ~/.config/copr
|
||||
- name: checkout sources
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 500
|
||||
fetch-tags: true
|
||||
- name: Setup safe Git directory
|
||||
run: git config --global --add safe.directory $GITHUB_WORKSPACE
|
||||
- name: trigger copr build
|
||||
run: |
|
||||
packit build in-copr --project freecad
|
||||
@@ -1,67 +0,0 @@
|
||||
name: Fetch Crowdin Translations
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 0 * * 1"
|
||||
|
||||
jobs:
|
||||
update-crowdin:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Qt ≥ 6.8
|
||||
uses: jurplel/install-qt-action@d325aaf2a8baeeda41ad0b5d39f84a6af9bcf005
|
||||
with:
|
||||
aqtversion: "==3.1.*"
|
||||
version: "6.8.3"
|
||||
host: "linux"
|
||||
target: "desktop"
|
||||
arch: "linux_gcc_64"
|
||||
|
||||
- name: Setup Python & dependencies
|
||||
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c
|
||||
with:
|
||||
python-version: "3.13"
|
||||
- name: Install Python packages
|
||||
run: |
|
||||
python3 -m pip install --upgrade pip
|
||||
pip install pyside6
|
||||
|
||||
- name: Gather translations from crowdin
|
||||
run: |
|
||||
./updatecrowdin.py build
|
||||
while ./updatecrowdin.py build-status | grep -q "status: inProgress"; do sleep 10; done
|
||||
./updatecrowdin.py download
|
||||
./updatecrowdin.py install
|
||||
working-directory: ./src/Tools
|
||||
env:
|
||||
CROWDIN_TOKEN: ${{ secrets.CROWDIN_TOKEN }}
|
||||
CROWDIN_PROJECT_ID: freecad
|
||||
|
||||
- name: Commit changes
|
||||
run: |
|
||||
git config --global user.name "github-actions"
|
||||
git config --global user.email "github-actions@github.com"
|
||||
git add src
|
||||
git commit -m "Update translations from Crowdin" || echo "No changes to commit"
|
||||
|
||||
- name: Push changes to a new branch
|
||||
run: |
|
||||
git branch update-crowdin-translations
|
||||
git push origin update-crowdin-translations --force
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e
|
||||
with:
|
||||
branch: update-crowdin-translations
|
||||
title: "Update translations from Crowdin"
|
||||
body: "Automatic Crowdin update."
|
||||
labels: "translations, automated"
|
||||
delete-branch: true
|
||||
add-paths: |
|
||||
src
|
||||
@@ -16,11 +16,6 @@ jobs:
|
||||
|
||||
steps:
|
||||
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Get dates for last month
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -35,13 +30,13 @@ jobs:
|
||||
echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Run issue-metrics tool
|
||||
uses: github/issue-metrics@637a24e71b78bc10881e61972b19ea9ff736e14a # v3.25.2
|
||||
uses: github/issue-metrics@v3
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SEARCH_QUERY: 'repo:FreeCAD/FreeCAD is:issue created:${{ env.last_month }}'
|
||||
|
||||
- name: Create issue
|
||||
uses: peter-evans/create-issue-from-file@fca9117c27cdc29c6c4db3b86c48e4115a786710 # v6.0.0
|
||||
uses: peter-evans/create-issue-from-file@v4
|
||||
with:
|
||||
title: Monthly issue metrics report
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -9,9 +9,6 @@ on:
|
||||
pull_request_target:
|
||||
types: [opened, reopened]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
label:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -20,12 +17,7 @@ jobs:
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1
|
||||
- uses: actions/labeler@v5
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
configuration-path: ".github/labels.yml"
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
name: Push Crowdin Translations
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 0 * * 1"
|
||||
|
||||
jobs:
|
||||
update-crowdin:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Qt ≥ 6.8
|
||||
uses: jurplel/install-qt-action@d325aaf2a8baeeda41ad0b5d39f84a6af9bcf005
|
||||
with:
|
||||
aqtversion: "==3.1.*"
|
||||
version: "6.8.3"
|
||||
host: "linux"
|
||||
target: "desktop"
|
||||
arch: "linux_gcc_64"
|
||||
|
||||
- name: Setup Python & dependencies
|
||||
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c
|
||||
with:
|
||||
python-version: "3.13"
|
||||
- name: Install Python packages
|
||||
run: |
|
||||
python3 -m pip install --upgrade pip
|
||||
pip install pyside6
|
||||
|
||||
- name: Push translations to Crowdin
|
||||
run: |
|
||||
./updatecrowdin.py gather
|
||||
./updatecrowdin.py upload
|
||||
working-directory: ./src/Tools
|
||||
env:
|
||||
CROWDIN_TOKEN: ${{ secrets.CROWDIN_TOKEN }}
|
||||
CROWDIN_PROJECT_ID: freecad
|
||||
@@ -1,81 +0,0 @@
|
||||
# This workflow uses actions that are not certified by GitHub. They are provided
|
||||
# by a third-party and are governed by separate terms of service, privacy
|
||||
# policy, and support documentation.
|
||||
|
||||
name: Scorecard supply-chain security
|
||||
on:
|
||||
# For Branch-Protection check. Only the default branch is supported. See
|
||||
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
|
||||
branch_protection_rule:
|
||||
# To guarantee Maintained check is occasionally updated. See
|
||||
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
|
||||
schedule:
|
||||
- cron: '20 7 * * 2'
|
||||
push:
|
||||
branches: ["main"]
|
||||
|
||||
# Declare default permissions as read only.
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
analysis:
|
||||
name: Scorecard analysis
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
# Needed to upload the results to code-scanning dashboard.
|
||||
security-events: write
|
||||
# Needed to publish results and get a badge (see publish_results below).
|
||||
id-token: write
|
||||
contents: read
|
||||
actions: read
|
||||
# To allow GraphQL ListCommits to work
|
||||
issues: read
|
||||
pull-requests: read
|
||||
# To detect SAST tools
|
||||
checks: read
|
||||
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: "Checkout code"
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: "Run analysis"
|
||||
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
|
||||
with:
|
||||
results_file: results.sarif
|
||||
results_format: sarif
|
||||
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
|
||||
# - you want to enable the Branch-Protection check on a *public* repository, or
|
||||
# - you are installing Scorecards on a *private* repository
|
||||
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
|
||||
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
|
||||
|
||||
# Public repositories:
|
||||
# - Publish results to OpenSSF REST API for easy access by consumers
|
||||
# - Allows the repository to include the Scorecard badge.
|
||||
# - See https://github.com/ossf/scorecard-action#publishing-results.
|
||||
# For private repositories:
|
||||
# - `publish_results` will always be set to `false`, regardless
|
||||
# of the value entered here.
|
||||
publish_results: true
|
||||
|
||||
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
||||
# format to the repository Actions tab.
|
||||
- name: "Upload artifact"
|
||||
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
||||
with:
|
||||
name: SARIF file
|
||||
path: results.sarif
|
||||
retention-days: 5
|
||||
|
||||
# Upload the results to GitHub's code scanning dashboard.
|
||||
- name: "Upload to code-scanning"
|
||||
uses: github/codeql-action/upload-sarif@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
@@ -0,0 +1,172 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is a build and test workflow for CI of FreeCAD.
|
||||
# This workflow aims at building and testing FreeCAD on a Conda environment on macOS.
|
||||
|
||||
name: Build macOS 13 (Apple Silicon)
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
artifactBasename:
|
||||
type: string
|
||||
required: true
|
||||
testOnBuildDir:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
allowedToFail:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
outputs:
|
||||
reportFile:
|
||||
value: ${{ jobs.Build.outputs.reportFile }}
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
runs-on: macos-14
|
||||
continue-on-error: ${{ inputs.allowedToFail }}
|
||||
env:
|
||||
CCACHE_DIR: ${{ github.workspace }}/ccache
|
||||
CCACHE_CONFIGPATH: ${{ github.workspace }}/ccache/config
|
||||
CCACHE_MAXSIZE: 1G
|
||||
CCACHE_COMPILERCHECK: "%compiler% -dumpfullversion -dumpversion" # default:mtime
|
||||
CCACHE_COMPRESS: true
|
||||
CCACHE_COMPRESSLEVEL: 1
|
||||
CC: arm64-apple-darwin20.0.0-clang
|
||||
CXX: arm64-apple-darwin20.0.0-clang++
|
||||
builddir: ${{ github.workspace }}/build/release/
|
||||
logdir: /tmp/logs/
|
||||
reportdir: /tmp/report/
|
||||
reportfilename: ${{ inputs.artifactBasename }}-report.md
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -l {0}
|
||||
outputs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
|
||||
steps:
|
||||
- name: Checking out source code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- name: Setup Miniconda
|
||||
env:
|
||||
CONDA_VERBOSITY: 2
|
||||
uses: conda-incubator/setup-miniconda@v3
|
||||
with:
|
||||
activate-environment: .conda/freecad
|
||||
environment-file: conda/conda-env.yaml
|
||||
channels: conda-forge
|
||||
channel-priority: true
|
||||
miniforge-version: latest
|
||||
conda-remove-defaults: "true"
|
||||
- name: Install FreeCAD dependencies
|
||||
env:
|
||||
CONDA_VERBOSITY: 2
|
||||
run: |
|
||||
./conda/setup-environment.sh
|
||||
- name: Set Environment Variables
|
||||
run: |
|
||||
echo "CC=$CC" >> "$GITHUB_ENV"
|
||||
echo "CXX=$CXX" >> "$GITHUB_ENV"
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
mkdir -p ${{ env.CCACHE_DIR }}
|
||||
mkdir -p ${{ env.CCACHE_CONFIGPATH }}
|
||||
mkdir -p ${{ env.builddir }}
|
||||
mkdir -p ${{ env.logdir }}
|
||||
mkdir -p ${{ env.reportdir }}
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
- name: Generate cache key
|
||||
id: genCacheKey
|
||||
uses: ./.github/workflows/actions/macos/generateCacheKey
|
||||
with:
|
||||
compiler: ${{ env.CXX }}
|
||||
- name: Restore Compiler Cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
save-always: true
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-
|
||||
FC-${{ steps.genCacheKey.outputs.cacheKey }}-
|
||||
- name: Print CCache statistics before build, reset stats and print config
|
||||
run: |
|
||||
ccache -s
|
||||
ccache -z
|
||||
ccache -p
|
||||
- name: CMake Configure
|
||||
run: |
|
||||
mamba run --live-stream -p .conda/freecad cmake --preset conda-macos-release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/.conda/freecad/opt/freecad
|
||||
- name: CMake Build
|
||||
run: |
|
||||
mamba run --live-stream -p .conda/freecad cmake --build build/release
|
||||
- name: Print ccache statistics after Build
|
||||
run: |
|
||||
ccache -s
|
||||
- name: FreeCAD CLI tests on build dir
|
||||
if: inputs.testOnBuildDir
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on build dir"
|
||||
testCommand: ${{ env.builddir }}/bin/FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIBuild.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: C++ tests
|
||||
timeout-minutes: 1
|
||||
uses: ./.github/workflows/actions/runCPPTests/runAllTests
|
||||
with:
|
||||
reportdir: ${{ env.reportdir }}
|
||||
builddir: ${{ env.builddir }}
|
||||
reportFile: ${{ env.reportdir }}${{ env.reportfilename }}
|
||||
- name: CMake Install
|
||||
run: |
|
||||
mamba run --live-stream -p .conda/freecad cmake --install build/release
|
||||
- name: FreeCAD CLI tests on install
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on install"
|
||||
testCommand: ${{ github.workspace }}/.conda/freecad/opt/freecad/bin/FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIInstall.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
/var/crash/*FreeCAD*
|
||||
- name: Upload report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.reportfilename }}
|
||||
path: |
|
||||
${{env.reportdir}}${{ env.reportfilename }}
|
||||
@@ -49,18 +49,13 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: ${{ inputs.allowedToFail }}
|
||||
env:
|
||||
CCACHE_DIR: ${{ github.workspace }}/ccache
|
||||
CCACHE_CONFIGPATH: ${{ github.workspace }}/ccache/config
|
||||
CCACHE_MAXSIZE: 1G
|
||||
CCACHE_COMPRESS: true
|
||||
CCACHE_COMPRESSLEVEL: 5
|
||||
CCACHE_CONFIGPATH: ${{ github.workspace }}/ccache/config
|
||||
CCACHE_DIR: ${{ github.workspace }}/ccache
|
||||
CCACHE_MAXSIZE: 1G
|
||||
CCACHE_NODIRECT: true
|
||||
CCACHE_NOHASHDIR: true
|
||||
CCACHE_NOINODECACHE: true
|
||||
CCACHE_SLOPPINESS: "include_file_ctime,include_file_mtime,pch_defines,time_macros"
|
||||
builddir: ${{ github.workspace }}/build/release/
|
||||
builddir: ${{ github.workspace }}/build/
|
||||
cacheKey: pixi-${{ matrix.os }}
|
||||
config: release
|
||||
logdir: ${{ github.workspace }}/logs/
|
||||
reportdir: ${{ github.workspace }}/report/
|
||||
reportfilename: ${{ inputs.artifactBasename }}-${{ matrix.os }}-report.md
|
||||
@@ -74,11 +69,6 @@ jobs:
|
||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Set Platform Environment Variables
|
||||
shell: bash -l {0}
|
||||
env:
|
||||
@@ -91,7 +81,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Add GCC Problem Matcher
|
||||
if: runner.os == 'Linux'
|
||||
@@ -116,15 +106,13 @@ jobs:
|
||||
mkdir -p ${{ env.reportdir }}
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: prefix-dev/setup-pixi@82d477f15f3a381dbcc8adc1206ce643fe110fb7 # v0.9.3
|
||||
- uses: prefix-dev/setup-pixi@v0.8.2
|
||||
with:
|
||||
pixi-version: v0.59.0
|
||||
pixi-version: v0.41.3
|
||||
cache: false
|
||||
|
||||
- name: Restore Compiler Cache
|
||||
id: cache-restore
|
||||
if: always()
|
||||
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-${{ env.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
|
||||
@@ -140,14 +128,13 @@ jobs:
|
||||
|
||||
- name: CMake Configure
|
||||
run: |
|
||||
pixi run configure-${{ env.config }}
|
||||
pixi run configure-release
|
||||
|
||||
- name: CMake Build
|
||||
run: |
|
||||
pixi run build-${{ env.config }}
|
||||
pixi run build
|
||||
|
||||
- name: Print ccache statistics after Build
|
||||
if: always()
|
||||
run: |
|
||||
pixi run ccache -s
|
||||
|
||||
@@ -182,7 +169,7 @@ jobs:
|
||||
|
||||
- name: CMake Install
|
||||
run: |
|
||||
pixi run install-${{ env.config }}
|
||||
pixi run install
|
||||
|
||||
- name: FreeCAD CLI tests on install
|
||||
if: runner.os != 'Windows'
|
||||
@@ -207,16 +194,15 @@ jobs:
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
|
||||
- name: Save Compiler Cache
|
||||
id: cache-save
|
||||
if: always()
|
||||
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-${{ env.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
|
||||
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-${{ matrix.os }}-Logs
|
||||
path: |
|
||||
@@ -225,7 +211,7 @@ jobs:
|
||||
|
||||
- name: Upload report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.reportfilename }}
|
||||
path: |
|
||||
|
||||
@@ -1,239 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is a build and test workflow for CI of FreeCAD.
|
||||
# This workflow aims at building and testing FreeCAD on Ubuntu 22.04 using GCC.
|
||||
|
||||
name: Build Ubuntu 22.04
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
artifactBasename:
|
||||
type: string
|
||||
required: true
|
||||
testOnBuildDir:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
allowedToFail:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
outputs:
|
||||
reportFile:
|
||||
value: ${{ jobs.Build.outputs.reportFile }}
|
||||
|
||||
jobs:
|
||||
|
||||
Build:
|
||||
runs-on: ubuntu-22.04
|
||||
continue-on-error: ${{ inputs.allowedToFail }}
|
||||
env:
|
||||
CCACHE_COMPILERCHECK: "%compiler% -dumpfullversion -dumpversion" # default:mtime
|
||||
CCACHE_COMPRESS: true
|
||||
CCACHE_COMPRESSLEVEL: 5
|
||||
CCACHE_CONFIGPATH: ${{ github.workspace }}/ccache/config
|
||||
CCACHE_DIR: ${{ github.workspace }}/ccache
|
||||
CCACHE_MAXSIZE: 1G
|
||||
CCACHE_NODIRECT: true
|
||||
CCACHE_NOHASHDIR: true
|
||||
CCACHE_NOINODECACHE: true
|
||||
CCACHE_SLOPPINESS: "include_file_ctime,include_file_mtime,pch_defines,time_macros"
|
||||
CC: /usr/bin/gcc
|
||||
CXX: /usr/bin/g++
|
||||
#CC: /usr/bin/clang
|
||||
#CXX: /usr/bin/clang++
|
||||
builddir: ${{ github.workspace }}/build/release/
|
||||
config: release
|
||||
logdir: /tmp/logs/
|
||||
reportdir: /tmp/report/
|
||||
reportfilename: ${{ inputs.artifactBasename }}-report.md
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
outputs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Checking out source code
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Install FreeCAD dependencies
|
||||
run: ./package/ubuntu/install-apt-packages.sh
|
||||
|
||||
- name: Install FreeCAD Python test dependencies
|
||||
run: |
|
||||
sudo apt-get update -y -qq
|
||||
sudo apt-get install -y -qq python3-pip
|
||||
python3 -m pip install --upgrade pip
|
||||
python3 -m pip install ifcopenshell==0.8.2
|
||||
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
mkdir -p ${{ env.CCACHE_DIR }}
|
||||
mkdir -p ${{ env.CCACHE_CONFIGPATH }}
|
||||
mkdir -p ${{ env.builddir }}
|
||||
mkdir -p ${{ env.logdir }}
|
||||
mkdir -p ${{ env.reportdir }}
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Generate cache key
|
||||
id: genCacheKey
|
||||
uses: ./.github/workflows/actions/linux/generateCacheKey
|
||||
with:
|
||||
compiler: ${{ env.CXX }}
|
||||
qt_major_version: 5
|
||||
|
||||
- name: Restore Compiler Cache
|
||||
id: cache-restore
|
||||
if: always()
|
||||
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-
|
||||
FC-${{ steps.genCacheKey.outputs.cacheKey }}-
|
||||
|
||||
- name: Print CCache statistics before build, reset stats and print config
|
||||
run: |
|
||||
ccache -s
|
||||
ccache -z
|
||||
ccache -p
|
||||
|
||||
- name: Install cmake
|
||||
uses: jwlawson/actions-setup-cmake@802fa1a2c4e212495c05bf94dba2704a92a472be # v2.0.2
|
||||
with:
|
||||
cmake-version: '3.31.6'
|
||||
|
||||
- name: CMake Configure
|
||||
uses: ./.github/workflows/actions/linux/configure
|
||||
with:
|
||||
extraParameters: -G Ninja --preset ${{ env.config }}
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Cmake.log
|
||||
errorFile: ${{ env.logdir }}CmakeErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
|
||||
- name: CMake Build
|
||||
uses: ./.github/workflows/actions/linux/build
|
||||
with:
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Build.log
|
||||
errorFile: ${{ env.logdir }}BuildErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
|
||||
- name: Print ccache statistics after Build
|
||||
if: always()
|
||||
run: |
|
||||
ccache -s
|
||||
|
||||
- name: FreeCAD CLI tests on build dir
|
||||
if: inputs.testOnBuildDir
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on build dir"
|
||||
testCommand: ${{ env.builddir }}/bin/FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIBuild.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
|
||||
- name: FreeCAD GUI tests on build dir
|
||||
if: inputs.testOnBuildDir
|
||||
timeout-minutes: 15
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "GUI tests on build dir"
|
||||
# Use Python wrapper to run only GUI-registered tests with the built FreeCAD executable
|
||||
testCommand: xvfb-run python3 ./.github/scripts/run_gui_tests.py "${{ env.builddir }}"
|
||||
logFile: ${{ env.logdir }}TestGUIBuild.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
|
||||
- name: C++ tests
|
||||
timeout-minutes: 1
|
||||
uses: ./.github/workflows/actions/runCPPTests/runAllTests
|
||||
with:
|
||||
reportdir: ${{ env.reportdir }}
|
||||
builddir: ${{ env.builddir }}
|
||||
reportFile: ${{ env.reportdir }}${{ env.reportfilename }}
|
||||
|
||||
- name: CMake Install
|
||||
uses: ./.github/workflows/actions/linux/install
|
||||
with:
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Install.log
|
||||
errorFile: ${{ env.logdir }}InstallErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
|
||||
- name: FreeCAD CLI tests on install
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on install"
|
||||
testCommand: FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIInstall.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
|
||||
- name: FreeCAD GUI tests on install
|
||||
timeout-minutes: 15
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "GUI tests on install"
|
||||
# Use Python wrapper to run only GUI-registered tests using the installed FreeCAD
|
||||
testCommand: xvfb-run python3 ./.github/scripts/run_gui_tests.py "FreeCAD"
|
||||
logFile: ${{ env.logdir }}TestGUIInstall.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
|
||||
- name: Save Compiler Cache
|
||||
id: cache-save
|
||||
if: always()
|
||||
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
|
||||
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
/var/crash/*FreeCAD*
|
||||
|
||||
- name: Upload report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
||||
with:
|
||||
name: ${{ env.reportfilename }}
|
||||
path: |
|
||||
${{env.reportdir}}${{ env.reportfilename }}
|
||||
@@ -0,0 +1,266 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is a build and test workflow for CI of FreeCAD.
|
||||
# This workflow aims at building and testing FreeCAD on Ubuntu 20.04 using GCC.
|
||||
|
||||
name: Build Ubuntu 20.04
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
artifactBasename:
|
||||
type: string
|
||||
required: true
|
||||
testOnBuildDir:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
allowedToFail:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
outputs:
|
||||
reportFile:
|
||||
value: ${{ jobs.Build.outputs.reportFile }}
|
||||
|
||||
jobs:
|
||||
|
||||
Build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ubuntu:20.04
|
||||
continue-on-error: ${{ inputs.allowedToFail }}
|
||||
env:
|
||||
LC_ALL: en_US.utf8
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
# set in a step to workaround https://github.com/actions/runner/issues/2058
|
||||
#CCACHE_DIR: ${{ github.workspace }}/ccache
|
||||
#CCACHE_CONFIGPATH: ${{ github.workspace }}/ccache/config
|
||||
CCACHE_MAXSIZE: 1G
|
||||
CCACHE_COMPILERCHECK: "%compiler% -dumpfullversion -dumpversion" # default:mtime
|
||||
CCACHE_COMPRESS: true
|
||||
CCACHE_COMPRESSLEVEL: 1
|
||||
CC: /usr/bin/gcc
|
||||
CXX: /usr/bin/g++
|
||||
#CC: /usr/bin/clang
|
||||
#CXX: /usr/bin/clang++
|
||||
# set in a step to workaround https://github.com/actions/runner/issues/2058
|
||||
#builddir: ${{ github.workspace }}/build/release/
|
||||
logdir: /tmp/logs/
|
||||
reportdir: /tmp/report/
|
||||
reportfilename: ${{ inputs.artifactBasename }}-report.md
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
outputs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
|
||||
steps:
|
||||
- name: Install basic packages
|
||||
run: |
|
||||
apt-get update -qq
|
||||
apt-get install -y --no-install-recommends --reinstall language-pack-en sudo git ca-certificates build-essential cmake
|
||||
- name: set env variables
|
||||
run: |
|
||||
echo "CCACHE_DIR=$GITHUB_WORKSPACE/ccache" >> "$GITHUB_ENV"
|
||||
echo "CCACHE_CONFIGPATH=$GITHUB_WORKSPACE/ccache/config" >> "$GITHUB_ENV"
|
||||
echo "builddir=$GITHUB_WORKSPACE/build/release/" >> "$GITHUB_ENV"
|
||||
- name: Checking out source code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- name: Install FreeCAD dependencies
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
ccache \
|
||||
doxygen \
|
||||
graphviz \
|
||||
imagemagick \
|
||||
libboost-date-time-dev \
|
||||
libboost-dev \
|
||||
libboost-filesystem-dev \
|
||||
libboost-graph-dev \
|
||||
libboost-iostreams-dev \
|
||||
libboost-program-options-dev \
|
||||
libboost-python-dev \
|
||||
libboost-regex-dev \
|
||||
libboost-serialization-dev \
|
||||
libboost-thread-dev \
|
||||
libcoin-dev \
|
||||
libeigen3-dev \
|
||||
libgts-bin \
|
||||
libgts-dev \
|
||||
libkdtree++-dev \
|
||||
libmedc-dev \
|
||||
libocct-data-exchange-dev \
|
||||
libocct-ocaf-dev \
|
||||
libocct-visualization-dev \
|
||||
libopencv-dev \
|
||||
libproj-dev \
|
||||
libpyside2-dev \
|
||||
libqt5opengl5-dev \
|
||||
libqt5svg5-dev \
|
||||
libqt5x11extras5-dev \
|
||||
libshiboken2-dev \
|
||||
libspnav-dev \
|
||||
libvtk7-dev \
|
||||
libx11-dev \
|
||||
libxerces-c-dev \
|
||||
libyaml-cpp-dev \
|
||||
libzipios++-dev \
|
||||
netgen \
|
||||
netgen-headers \
|
||||
ninja-build \
|
||||
occt-draw \
|
||||
pyqt5-dev-tools \
|
||||
pyside2-tools \
|
||||
python3-dev \
|
||||
python3-git \
|
||||
python3-markdown \
|
||||
python3-matplotlib \
|
||||
python3-packaging \
|
||||
python3-pivy \
|
||||
python3-ply \
|
||||
python3-pyside2.qtcore \
|
||||
python3-pyside2.qtgui \
|
||||
python3-pyside2.qtnetwork \
|
||||
python3-pyside2.qtsvg \
|
||||
python3-pyside2.qtwidgets \
|
||||
python3-yaml \
|
||||
qtbase5-dev \
|
||||
qttools5-dev \
|
||||
shiboken2 \
|
||||
swig \
|
||||
xvfb
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
mkdir -p ${{ env.CCACHE_DIR }}
|
||||
mkdir -p ${{ env.CCACHE_CONFIGPATH }}
|
||||
mkdir -p ${{ env.builddir }}
|
||||
mkdir -p ${{ env.logdir }}
|
||||
mkdir -p ${{ env.reportdir }}
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
- name: Generate cache key
|
||||
id: genCacheKey
|
||||
uses: ./.github/workflows/actions/linux/generateCacheKey
|
||||
with:
|
||||
compiler: ${{ env.CXX }}
|
||||
qt_major_version: 5
|
||||
- name: Restore Compiler Cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
save-always: true
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-
|
||||
FC-${{ steps.genCacheKey.outputs.cacheKey }}-
|
||||
- name: Print CCache statistics before build, reset stats and print config
|
||||
run: |
|
||||
ccache -s
|
||||
ccache -z
|
||||
ccache -p
|
||||
- name: CMake Configure
|
||||
uses: ./.github/workflows/actions/linux/configure
|
||||
with:
|
||||
extraParameters: -G Ninja -D CMAKE_BUILD_TYPE=Release
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Cmake.log
|
||||
errorFile: ${{ env.logdir }}CmakeErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: CMake Build
|
||||
uses: ./.github/workflows/actions/linux/build
|
||||
with:
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Build.log
|
||||
errorFile: ${{ env.logdir }}BuildErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: Print ccache statistics after Build
|
||||
run: |
|
||||
ccache -s
|
||||
- name: FreeCAD CLI tests on build dir
|
||||
if: inputs.testOnBuildDir
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on build dir"
|
||||
testCommand: ${{ env.builddir }}/bin/FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIBuild.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: FreeCAD GUI tests on build dir
|
||||
if: inputs.testOnBuildDir
|
||||
timeout-minutes: 15
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "GUI tests on build dir"
|
||||
testCommand: xvfb-run ${{ env.builddir }}/bin/FreeCAD -t 0
|
||||
logFile: ${{ env.logdir }}TestGUIBuild.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: C++ tests
|
||||
timeout-minutes: 1
|
||||
uses: ./.github/workflows/actions/runCPPTests/runAllTests
|
||||
with:
|
||||
reportdir: ${{ env.reportdir }}
|
||||
builddir: ${{ env.builddir }}
|
||||
reportFile: ${{ env.reportdir }}${{ env.reportfilename }}
|
||||
- name: CMake Install
|
||||
uses: ./.github/workflows/actions/linux/install
|
||||
with:
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Install.log
|
||||
errorFile: ${{ env.logdir }}InstallErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: FreeCAD CLI tests on install
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on install"
|
||||
testCommand: FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIInstall.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: FreeCAD GUI tests on install
|
||||
timeout-minutes: 15
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "GUI tests on install"
|
||||
testCommand: xvfb-run FreeCAD -t 0
|
||||
logFile: ${{ env.logdir }}TestGUIInstall.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
/var/crash/*FreeCAD*
|
||||
- name: Upload report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.reportfilename }}
|
||||
path: |
|
||||
${{env.reportdir}}${{ env.reportfilename }}
|
||||
@@ -0,0 +1,201 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is a build and test workflow for CI of FreeCAD.
|
||||
# This workflow aims at building and testing FreeCAD on a Conda environment on Linux.
|
||||
|
||||
name: Build Ubuntu 24.04 (Conda)
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
artifactBasename:
|
||||
type: string
|
||||
required: true
|
||||
testOnBuildDir:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
allowedToFail:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
outputs:
|
||||
reportFile:
|
||||
value: ${{ jobs.Build.outputs.reportFile }}
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
runs-on: ubuntu-24.04
|
||||
continue-on-error: ${{ inputs.allowedToFail }}
|
||||
env:
|
||||
CCACHE_DIR: ${{ github.workspace }}/ccache
|
||||
CCACHE_CONFIGPATH: ${{ github.workspace }}/ccache/config
|
||||
CCACHE_MAXSIZE: 1G
|
||||
CCACHE_COMPILERCHECK: "%compiler% -dumpfullversion -dumpversion" # default:mtime
|
||||
CCACHE_COMPRESS: true
|
||||
CCACHE_COMPRESSLEVEL: 1
|
||||
builddir: ${{ github.workspace }}/build/release/
|
||||
logdir: /tmp/logs/
|
||||
reportdir: /tmp/report/
|
||||
reportfilename: ${{ inputs.artifactBasename }}-report.md
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -l {0}
|
||||
outputs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
|
||||
steps:
|
||||
- name: Checking out source code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- name: Setup Miniconda
|
||||
env:
|
||||
CONDA_VERBOSITY: 2
|
||||
uses: conda-incubator/setup-miniconda@v3
|
||||
with:
|
||||
activate-environment: .conda/freecad
|
||||
environment-file: conda/conda-env.yaml
|
||||
channels: conda-forge
|
||||
channel-priority: true
|
||||
miniforge-version: latest
|
||||
conda-remove-defaults: "true"
|
||||
- name: Install FreeCAD dependencies
|
||||
env:
|
||||
CONDA_VERBOSITY: 2
|
||||
run: |
|
||||
./conda/setup-environment.sh
|
||||
- name: Set Environment Variables
|
||||
run: |
|
||||
echo "CC=$CC" >> "$GITHUB_ENV"
|
||||
echo "CXX=$CXX" >> "$GITHUB_ENV"
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
mkdir -p ${{ env.CCACHE_DIR }}
|
||||
mkdir -p ${{ env.CCACHE_CONFIGPATH }}
|
||||
mkdir -p ${{ env.builddir }}
|
||||
mkdir -p ${{ env.logdir }}
|
||||
mkdir -p ${{ env.reportdir }}
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
- name: Generate cache key
|
||||
id: genCacheKey
|
||||
uses: ./.github/workflows/actions/linux/generateCacheKey
|
||||
with:
|
||||
compiler: ${{ env.CXX }}
|
||||
qt_major_version: 5
|
||||
- name: Restore Compiler Cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
save-always: true
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-
|
||||
FC-${{ steps.genCacheKey.outputs.cacheKey }}-
|
||||
- name: Print CCache statistics before build, reset stats and print config
|
||||
run: |
|
||||
ccache -s
|
||||
ccache -z
|
||||
ccache -p
|
||||
- name: CMake Configure
|
||||
uses: ./.github/workflows/actions/linux/configure
|
||||
with:
|
||||
extraParameters: --preset conda-linux-release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/.conda/freecad/opt/freecad
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Cmake.log
|
||||
errorFile: ${{ env.logdir }}CmakeErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: CMake Build
|
||||
uses: ./.github/workflows/actions/linux/build
|
||||
with:
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Build.log
|
||||
errorFile: ${{ env.logdir }}BuildErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: Print ccache statistics after Build
|
||||
run: |
|
||||
ccache -s
|
||||
- name: FreeCAD CLI tests on build dir
|
||||
if: inputs.testOnBuildDir
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on build dir"
|
||||
testCommand: ${{ env.builddir }}/bin/FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIBuild.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: FreeCAD GUI tests on build dir
|
||||
if: inputs.testOnBuildDir
|
||||
timeout-minutes: 15
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "GUI tests on build dir"
|
||||
testCommand: xvfb-run ${{ env.builddir }}/bin/FreeCAD -t 0
|
||||
logFile: ${{ env.logdir }}TestGUIBuild.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: C++ tests
|
||||
timeout-minutes: 1
|
||||
uses: ./.github/workflows/actions/runCPPTests/runAllTests
|
||||
with:
|
||||
reportdir: ${{ env.reportdir }}
|
||||
builddir: ${{ env.builddir }}
|
||||
reportFile: ${{ env.reportdir }}${{ env.reportfilename }}
|
||||
- name: CMake Install
|
||||
uses: ./.github/workflows/actions/linux/install
|
||||
with:
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Install.log
|
||||
errorFile: ${{ env.logdir }}InstallErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: FreeCAD CLI tests on install
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on install"
|
||||
testCommand: ${{ github.workspace }}/.conda/freecad/opt/freecad/bin/FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIInstall.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: FreeCAD GUI tests on install
|
||||
timeout-minutes: 15
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "GUI tests on install"
|
||||
testCommand: xvfb-run ${{ github.workspace }}/.conda/freecad/opt/freecad/bin/FreeCAD -t 0
|
||||
logFile: ${{ env.logdir }}TestGUIInstall.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
/var/crash/*FreeCAD*
|
||||
- name: Upload report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.reportfilename }}
|
||||
path: |
|
||||
${{env.reportdir}}${{ env.reportfilename }}
|
||||
@@ -42,22 +42,19 @@ jobs:
|
||||
runs-on: windows-latest
|
||||
continue-on-error: ${{ inputs.allowedToFail }}
|
||||
env:
|
||||
CCACHE_COMPILERCHECK: "%compiler%" # default:mtime
|
||||
CCACHE_COMPRESS: true
|
||||
CCACHE_COMPRESSLEVEL: 5
|
||||
CCACHE_DIR: C:/FC/cache/
|
||||
CCACHE_LOGFILE: C:/logs/ccache.log
|
||||
CCACHE_COMPILERCHECK: "%compiler%" # default:mtime
|
||||
CCACHE_MAXSIZE: 1G
|
||||
CCACHE_NODIRECT: true
|
||||
CCACHE_COMPRESS: true
|
||||
CCACHE_COMPRESSLEVEL: 1
|
||||
CCACHE_NOHASHDIR: true
|
||||
CCACHE_NOINODECACHE: true
|
||||
CCACHE_SLOPPINESS: "include_file_ctime,include_file_mtime,pch_defines,time_macros" # Can't get PCH to work on Windows
|
||||
CCACHE_DIRECT: true
|
||||
#CCACHE_SLOPPINESS: "pch_defines,time_macros" # Can't get PCH to work on Windows
|
||||
CCACHE_LOGFILE: C:/logs/ccache.log
|
||||
## Have to use C:\ because not enough space on workspace drive
|
||||
builddir: C:/FC/build/release/
|
||||
cacheKey: Windows
|
||||
ccachebindir: C:/FC/ccache/
|
||||
config: release
|
||||
libpackdir: C:/FC/libpack/
|
||||
ccachebindir: C:/FC/ccache/
|
||||
logdir: C:/logs/
|
||||
reportdir: C:/report/
|
||||
reportfilename: ${{ inputs.artifactBasename }}-report.md
|
||||
@@ -65,16 +62,10 @@ jobs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Checking out source code
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
@@ -85,43 +76,32 @@ jobs:
|
||||
mkdir ${{ env.logdir }}
|
||||
mkdir ${{ env.reportdir }}
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Get Ccache
|
||||
uses: ./.github/workflows/actions/windows/getCcache
|
||||
with:
|
||||
ccachebindir: ${{ env.ccachebindir }}
|
||||
|
||||
- name: Get Libpack
|
||||
uses: ./.github/workflows/actions/windows/getLibpack
|
||||
with:
|
||||
libpackdir: ${{ env.libpackdir }}
|
||||
|
||||
- name: Restore compiler cache
|
||||
id: cache-restore
|
||||
if: always()
|
||||
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
save-always: true
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-${{ env.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
|
||||
key: FC-Windows-${{ github.ref }}-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
FC-${{ env.cacheKey }}-${{ github.ref }}-
|
||||
FC-${{ env.cacheKey }}-
|
||||
|
||||
FC-Windows-${{ github.ref }}-
|
||||
FC-Windows-
|
||||
- name: Print Ccache statistics before build, reset stats and print config
|
||||
run: |
|
||||
. $env:ccachebindir\ccache -s
|
||||
. $env:ccachebindir\ccache -z
|
||||
. $env:ccachebindir\ccache -p
|
||||
|
||||
- name: Install cmake
|
||||
uses: jwlawson/actions-setup-cmake@802fa1a2c4e212495c05bf94dba2704a92a472be # v2.0.2
|
||||
with:
|
||||
cmake-version: '3.31.6'
|
||||
|
||||
- name: Configuring CMake
|
||||
run: >
|
||||
cmake -B"${{ env.builddir }}" .
|
||||
--preset ${{ env.config }}
|
||||
--preset release
|
||||
-DCMAKE_VS_NO_COMPILE_BATCHING=ON
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DFREECAD_USE_PCH=OFF
|
||||
@@ -130,41 +110,26 @@ jobs:
|
||||
-DFREECAD_COPY_DEPEND_DIRS_TO_BUILD=ON
|
||||
-DFREECAD_COPY_LIBPACK_BIN_TO_BUILD=ON
|
||||
-DFREECAD_COPY_PLUGINS_BIN_TO_BUILD=ON
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
|
||||
|
||||
uses: microsoft/setup-msbuild@v2
|
||||
- name: Compiling sources
|
||||
run: |
|
||||
cd $env:builddir
|
||||
msbuild ALL_BUILD.vcxproj /m /p:Configuration=Release /p:TrackFileAccess=false /p:CLToolPath=${{ env.ccachebindir }}
|
||||
|
||||
- name: Print Ccache statistics after build
|
||||
if: always()
|
||||
run: |
|
||||
. $env:ccachebindir\ccache -s
|
||||
|
||||
- name: C++ unit tests
|
||||
if: false # Disabled because seems to not function on Windows build
|
||||
timeout-minutes: 1
|
||||
run: |
|
||||
. ${{ env.builddir }}\tests\Release\Tests_run --gtest_output=json:${{ env.reportdir }}gtest_results.json # 2>&1 | tee -filepath ${{ env.logdir }}\unitTests.log
|
||||
|
||||
- name: FreeCAD CLI tests
|
||||
run: |
|
||||
. ${{ env.builddir }}\bin\FreeCADCmd -t 0 # 2>&1 | tee -filepath ${{ env.logdir }}\integrationTests.log
|
||||
|
||||
- name: Save Compiler Cache
|
||||
id: cache-save
|
||||
if: always()
|
||||
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-${{ env.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
|
||||
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-Logs
|
||||
path: |
|
||||
|
||||
+509
-111
@@ -34,21 +34,12 @@ on:
|
||||
changedFiles:
|
||||
type: string
|
||||
required: true
|
||||
changedLines:
|
||||
type: string
|
||||
required: false
|
||||
changedCppFiles:
|
||||
type: string
|
||||
required: true
|
||||
changedCppLines:
|
||||
type: string
|
||||
required: false
|
||||
changedPythonFiles:
|
||||
type: string
|
||||
required: true
|
||||
changedPythonLines:
|
||||
type: string
|
||||
required: false
|
||||
checkLineendings:
|
||||
default: false
|
||||
type: boolean
|
||||
@@ -85,6 +76,14 @@ on:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
cpplintFilters:
|
||||
default: -whitespace-*
|
||||
type: string
|
||||
required: false
|
||||
cpplintLineLength:
|
||||
default: 120
|
||||
type: string
|
||||
required: false
|
||||
cpplintFailSilent:
|
||||
default: true
|
||||
type: boolean
|
||||
@@ -130,7 +129,7 @@ on:
|
||||
type: string
|
||||
required: false
|
||||
spellingIgnore:
|
||||
default: ./.git*,*.po,*.ts,*.svg,./src/3rdParty,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL*,./src/Doc/FreeCAD.uml,./build/
|
||||
default: ./.git,*.po,*.ts,*.svg,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL*,./src/WindowsInstaller,./src/Doc/FreeCAD.uml,./build/
|
||||
type: string
|
||||
required: false
|
||||
codespellFailSilent:
|
||||
@@ -141,12 +140,16 @@ on:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
clangTidyChecks:
|
||||
default: # empty to use the .clang-tidy file
|
||||
type: string
|
||||
required: false
|
||||
clangTidyFailSilent:
|
||||
default: true # warnings or notes will never fail the CI, only errors
|
||||
type: boolean
|
||||
required: false
|
||||
checkClazy: # for the Message codes see: https://invent.kde.org/sdk/clazy#list-of-checks
|
||||
default: false
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
clazyChecks:
|
||||
@@ -158,7 +161,7 @@ on:
|
||||
type: boolean
|
||||
required: false
|
||||
checkClazyQT6:
|
||||
default: false
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
clazyQT6Checks:
|
||||
@@ -177,9 +180,6 @@ on:
|
||||
reportFile:
|
||||
value: ${{ jobs.Lint.outputs.reportFile }}
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
|
||||
Lint:
|
||||
@@ -197,16 +197,10 @@ jobs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Check out code
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
@@ -214,157 +208,561 @@ jobs:
|
||||
mkdir -p ${{ env.fixesdir }}
|
||||
mkdir -p ${{ env.reportdir }}
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
|
||||
# Generic lints steps
|
||||
- name: Check File Case Sensitivity
|
||||
uses: credfeto/action-case-checker@cb652aeab29ed363bbdb7d9ee1bfcc010c46cac5 # v1.3.0
|
||||
|
||||
# Run generic lints
|
||||
- name: Check for non Unix line ending
|
||||
if: inputs.checkLineendings && always()
|
||||
continue-on-error: ${{ inputs.lineendingsFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/generic_checks.py \
|
||||
--lineendings-check \
|
||||
--files "${{ inputs.changedFiles }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}" \
|
||||
--log-dir "${{ env.logdir }}"
|
||||
|
||||
lineendings=0
|
||||
for file in ${{ inputs.changedFiles }}
|
||||
do
|
||||
# Check for DOS or MAC line endings
|
||||
if [[ $(file -b $file) =~ "with CR" ]]
|
||||
then
|
||||
echo "::warning file=$file,title=$file::File has non Unix line endings"
|
||||
echo "$file has non Unix line endings" >> ${{ env.logdir }}lineendings.log
|
||||
((lineendings=lineendings+1))
|
||||
fi
|
||||
done
|
||||
echo "Found $lineendings line ending errors"
|
||||
# Write the report
|
||||
if [ $lineendings -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:information_source: Found $lineendings problems with line endings</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}lineendings.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo ":heavy_check_mark: No line ending problem found " >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $lineendings -eq 0 ]
|
||||
- name: Check for trailing whitespaces
|
||||
if: inputs.checkWhitespace && always()
|
||||
continue-on-error: ${{ inputs.whitespaceFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/generic_checks.py \
|
||||
--whitespace-check \
|
||||
--files "${{ inputs.changedFiles }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}" \
|
||||
--log-dir "${{ env.logdir }}"
|
||||
|
||||
whitespaceErrors=0
|
||||
exclude="*[.md]"
|
||||
for file in ${{ inputs.changedFiles }}
|
||||
do
|
||||
# Check for trailing whitespaces
|
||||
grep -nIHE --exclude="$exclude" " $" $file | sed -e "s/$/<-- trailing whitespace/" >> ${{ env.logdir }}whitespace.log || true
|
||||
done
|
||||
# Write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}whitespace.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/grepMatcherWarning.json"
|
||||
cat ${{ env.logdir }}whitespace.log
|
||||
echo "::remove-matcher owner=grepMatcher-warning::"
|
||||
whitespaceErrors=$(wc -l < ${{ env.logdir }}whitespace.log)
|
||||
fi
|
||||
echo "Found $whitespaceErrors whitespace errors"
|
||||
# Write the report
|
||||
if [ $whitespaceErrors -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:information_source: Found $whitespaceErrors trailing whitespace</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}whitespace.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo ":heavy_check_mark: No trailing whitespace found " >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $whitespaceErrors -eq 0 ]
|
||||
- name: Check for Tab usage
|
||||
if: inputs.checkTabs && always()
|
||||
continue-on-error: ${{ inputs.tabsFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/generic_checks.py \
|
||||
--tabs-check \
|
||||
--files "${{ inputs.changedFiles }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}" \
|
||||
--log-dir "${{ env.logdir }}"
|
||||
|
||||
# Python linting steps
|
||||
|
||||
tabErrors=0
|
||||
exclude="*[.md]"
|
||||
# Check for Tab usage
|
||||
for file in ${{ steps.changed-files.outputs.all_changed_files }}
|
||||
do
|
||||
grep -nIHE --exclude="$exclude" $'\t' $file | sed -e "s/$/ <-- contains tab/" >> ${{ env.logdir }}tab.log || true
|
||||
done
|
||||
# Write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}tab.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/grepMatcherWarning.json"
|
||||
cat ${{ env.logdir }}tab.log
|
||||
echo "::remove-matcher owner=grepMatcher-warning::"
|
||||
tabErrors=$(wc -l < ${{ env.logdir }}tab.log)
|
||||
fi
|
||||
echo "Found $tabErrors tab errors"
|
||||
# Write the report
|
||||
if [ $tabErrors -gt 0 ]; then
|
||||
echo "<details><summary>:information_source: Found $tabErrors tabs, better to use spaces</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}tab.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo ":heavy_check_mark: No tabs found" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $tabErrors -eq 0 ]
|
||||
# Run Python lints
|
||||
- name: Pylint
|
||||
if: inputs.checkPylint && inputs.changedPythonFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.pylintFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/pylint.py \
|
||||
--files "${{ inputs.changedPythonFiles }}" \
|
||||
--disable "${{ inputs.pylintDisable }}" \
|
||||
--log-dir "${{ env.logdir }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}"
|
||||
|
||||
- name: Black
|
||||
pylintErrors=0
|
||||
pylintWarnings=0
|
||||
pylintRefactorings=0
|
||||
pylintConventions=0
|
||||
pip install --break-system-packages pylint
|
||||
# List enabled pylint checks
|
||||
pylint --list-msgs-enabled > ${{ env.logdir }}pylint-enabled-checks.log
|
||||
# Run pylint on all python files
|
||||
set +e
|
||||
pylint --disable=${{ inputs.pylintDisable }} ${{ inputs.changedPythonFiles }} > ${{ env.logdir }}pylint.log
|
||||
exitCode=$?
|
||||
set -e
|
||||
# If pylint has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}pylint.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/pylintError.json"
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/pylintWarning.json"
|
||||
cat ${{ env.logdir }}pylint.log
|
||||
echo "::remove-matcher owner=pylint-error::"
|
||||
echo "::remove-matcher owner=pylint-warning::"
|
||||
pylintErrors=$( grep -oP '(?<=error \|)\d+' ${{ env.logdir }}pylint.log) || true # grep returns 0 if no match is found
|
||||
pylintWarnings=$( grep -oP '(?<=warning \|)\d+' ${{ env.logdir }}pylint.log) || true
|
||||
pylintRefactorings=$( grep -oP '(?<=refactor \|)\d+' ${{ env.logdir }}pylint.log) || true
|
||||
pylintConventions=$( grep -oP '(?<=convention \|)\d+' ${{ env.logdir }}pylint.log) || true
|
||||
fi
|
||||
echo "Found $pylintErrors errors, $pylintWarnings warnings, $pylintRefactorings refactorings, $pylintConventions conventions"
|
||||
# Write the report
|
||||
if [ $pylintErrors -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:fire: Pylint found :fire: $pylintErrors errors, :warning: $pylintWarnings warnings, :construction: $pylintRefactorings refactorings and :pencil2: $pylintConventions conventions</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ $pylintWarnings -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:warning: Pylint found :warning: $pylintWarnings warnings, :construction: $pylintRefactorings refactorings and :pencil2: $pylintConventions conventions</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ $pylintRefactorings -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:construction: Pylint found :construction: $pylintRefactorings refactorings and :pencil2: $pylintConventions conventions</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ $pylintConventions -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:pencil2: Pylint found :pencil2: $pylintConventions conventions</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: No pylint errors found </summary> " >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# List enabled checks in the report
|
||||
echo "<details><summary>:information_source: Enabled checks</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}pylint-enabled-checks.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}pylint.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $pylintErrors -eq 0 ]
|
||||
- name: Black (Python)
|
||||
if: inputs.checkBlack && inputs.changedPythonFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.blackFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/black.py \
|
||||
--files "${{ inputs.changedPythonFiles }}" \
|
||||
--log-dir "${{ env.logdir }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}"
|
||||
|
||||
# C++ linting steps
|
||||
|
||||
blackReformats=0
|
||||
blackFails=0
|
||||
pip install --break-system-packages black
|
||||
set +e
|
||||
black --line-length 100 --check ${{ inputs.changedPythonFiles }} &> ${{ env.logdir }}black.log
|
||||
exitCode=$?
|
||||
set -e
|
||||
# If black has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}black.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/blackWarning.json"
|
||||
cat ${{ env.logdir }}black.log
|
||||
echo "::remove-matcher owner=black-warning::"
|
||||
blackReformats=$( grep -oP '\d+(?= fil.+ would be reformatted)' ${{ env.logdir }}black.log) || true # grep returns 0 if no match is found
|
||||
blackFails=$( grep -oP '\d+(?= fil.+ would fail to reformat)' ${{ env.logdir }}black.log) || true
|
||||
fi
|
||||
echo "Found $blackReformats files would be reformatted and $blackFails files would fail to reformat"
|
||||
# Write the report
|
||||
if [ $blackReformats -gt 0 ] || [ $blackFails -gt 0 ] #FIXME purpose of testing $blackFails as we don't use it then
|
||||
then
|
||||
echo "<details><summary>:pencil2: Black would reformat $blackReformats files</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: Black would reformat no file</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}black.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $exitCode -eq 0 ]
|
||||
# Run C++ lints
|
||||
- name: Install FreeCAD dependencies
|
||||
if: inputs.changedCppFiles != '' && always()
|
||||
run: ./package/ubuntu/install-apt-packages.sh
|
||||
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
doxygen \
|
||||
graphviz \
|
||||
imagemagick \
|
||||
libboost-date-time-dev \
|
||||
libboost-dev \
|
||||
libboost-filesystem-dev \
|
||||
libboost-graph-dev \
|
||||
libboost-iostreams-dev \
|
||||
libboost-program-options-dev \
|
||||
libboost-python-dev \
|
||||
libboost-regex-dev \
|
||||
libboost-serialization-dev \
|
||||
libboost-thread-dev \
|
||||
libcoin-dev \
|
||||
libeigen3-dev \
|
||||
libgts-bin \
|
||||
libgts-dev \
|
||||
libkdtree++-dev \
|
||||
libmedc-dev \
|
||||
libocct-data-exchange-dev \
|
||||
libocct-ocaf-dev \
|
||||
libocct-visualization-dev \
|
||||
libopencv-dev \
|
||||
libproj-dev \
|
||||
libpyside2-dev \
|
||||
libqt5opengl5-dev \
|
||||
libqt5svg5-dev \
|
||||
libqt5x11extras5-dev \
|
||||
libshiboken2-dev \
|
||||
libspnav-dev \
|
||||
libvtk9-dev \
|
||||
libx11-dev \
|
||||
libxerces-c-dev \
|
||||
libyaml-cpp-dev \
|
||||
libzipios++-dev \
|
||||
netgen \
|
||||
netgen-headers \
|
||||
occt-draw \
|
||||
pyside2-tools \
|
||||
python3-dev \
|
||||
python3-git \
|
||||
python3-markdown \
|
||||
python3-matplotlib \
|
||||
python3-packaging \
|
||||
python3-pivy \
|
||||
python3-ply \
|
||||
python3-pyside2.qtcore \
|
||||
python3-pyside2.qtgui \
|
||||
python3-pyside2.qtnetwork \
|
||||
python3-pyside2.qtsvg \
|
||||
python3-pyside2.qtwidgets \
|
||||
qtbase5-dev \
|
||||
qttools5-dev \
|
||||
shiboken2 \
|
||||
swig \
|
||||
ccache \
|
||||
xvfb
|
||||
- name: Run CMake # This is needed for Clang tools to work correctly
|
||||
if: inputs.changedCppFiles != '' && always()
|
||||
run: |
|
||||
mkdir build && cmake -S ./ -B ./build/ -D CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE
|
||||
|
||||
- name: Check old Qt string-based connections (https://wiki.qt.io/New_Signal_Slot_Syntax)
|
||||
if: inputs.checkQtConnections && inputs.changedCppFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.qtConnectionsFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/qt_connections.py \
|
||||
--files "${{ inputs.changedFiles }}" \
|
||||
--log-dir "${{ env.logdir }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}"
|
||||
|
||||
qtconnectionSyntax=0
|
||||
exclude="*[.md,.log,.ts,.git]"
|
||||
# Check all files for QT string-based connections
|
||||
for file in ${{ inputs.changedFiles }} #TODO does this makes sense in Python files ?
|
||||
do
|
||||
grep -nIHE --exclude="$exclude" $' SIGNAL| SLOT' $file | sed -e "s/$/ <--Consider using Functor-Based Connections/" >> ${{ env.logdir }}qtConnections.log || true #TODO seems to trigger false positives
|
||||
done
|
||||
# Write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}qtConnections.log ]; then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/grepMatcherWarning.json"
|
||||
cat ${{ env.logdir }}qtConnections.log
|
||||
echo "::remove-matcher owner=grepMatcher-warning::"
|
||||
qtconnectionSyntax=$(wc -l < ${{ env.logdir }}qtConnections.log)
|
||||
fi
|
||||
echo "Found $qtconnectionSyntax QT string-based connections"
|
||||
# Write the report
|
||||
if [ $qtconnectionSyntax -gt 0 ]; then
|
||||
echo "<details><summary>:information_source: Found $qtconnectionSyntax QT string-based connections :arrow_right: consider using QT functor-Based Connections</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# documentation link
|
||||
echo "For more information see: https://wiki.qt.io/New_Signal_Slot_Syntax or https://github.com/FreeCAD/FreeCAD/issues/6166" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}qtConnections.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo ":heavy_check_mark: No string-based connections found " >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $qtconnectionSyntax -eq 0 ]
|
||||
- name: Cpplint
|
||||
if: inputs.checkCpplint && inputs.changedCppFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.cpplintFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/cpplint.py \
|
||||
--files "${{ inputs.changedCppFiles }}" \
|
||||
--log-dir "${{ env.logdir }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}"
|
||||
|
||||
cpplintErrors=0
|
||||
pip install --break-system-packages cpplint
|
||||
# Run cpplint
|
||||
for file in ${{ inputs.changedCppFiles }}
|
||||
do
|
||||
cpplint --filter=${{ inputs.cpplintFilters }} --linelength=${{ inputs.cpplintLineLength }} $file &>> ${{ env.logdir }}cpplint.log || true
|
||||
done
|
||||
# If cpplint has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ ${{ env.logdir }}cpplint.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/cpplint.json"
|
||||
cat ${{ env.logdir }}cpplint.log
|
||||
echo "::remove-matcher owner=cpplint::"
|
||||
cpplintErrors=$(grep -nIHE "\[[0-9]\]$" ${{ env.logdir }}cpplint.log | wc -l ) || true
|
||||
fi
|
||||
echo "Found $cpplintErrors cpplint errors"
|
||||
# Write the report
|
||||
if [ $cpplintErrors -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:warning: CppLint found $cpplintErrors errors / warnings</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: No cpplint errors found </summary> " >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}cpplint.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $cpplintErrors -eq 0 ]
|
||||
- name: Clang-format
|
||||
if: inputs.checkClangFormat && inputs.changedCppFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.clangFormatFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/clang_format.py \
|
||||
--files "${{ inputs.changedCppFiles }}" \
|
||||
--clang-style "${{ inputs.clangStyle }}" \
|
||||
--log-dir "${{ env.logdir }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}"
|
||||
|
||||
clangFormatErrors=0
|
||||
# Run clang-format on all cpp files
|
||||
clang-format --dry-run --ferror-limit=1 --verbose --style=${{ inputs.clangStyle }} ${{ inputs.changedCppFiles }} &>> ${{ env.logdir }}clang-format.log || true
|
||||
# If clang-format has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}clang-format.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/clang.json"
|
||||
cat ${{ env.logdir }}clang-format.log
|
||||
echo "::remove-matcher owner=clang::"
|
||||
clangFormatErrors=$(grep -nIHE "\[-Wclang-format-violations]$" ${{ env.logdir }}clang-format.log | wc -l ) || true
|
||||
fi
|
||||
echo "Found $clangFormatErrors clang-format errors"
|
||||
# Write the report
|
||||
if [ $clangFormatErrors -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:pencil2: Clang-format would reformat $clangFormatErrors files</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: Clang-format would reformat no file</summary> " >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}clang-format.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $clangFormatErrors -eq 0 ]
|
||||
- name: Codespell
|
||||
if: inputs.checkSpelling && always()
|
||||
continue-on-error: ${{ inputs.codespellFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/codespell.py \
|
||||
--files ${{ inputs.changedFiles }} \
|
||||
--ignore-words "${{ inputs.listIgnoredMisspelling }}" \
|
||||
--skip "${{ inputs.spellingIgnore }}" \
|
||||
--log-dir "${{ env.logdir }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}"
|
||||
|
||||
pip install --break-system-packages codespell
|
||||
wget https://raw.githubusercontent.com/codespell-project/codespell/master/codespell_lib/data/dictionary.txt
|
||||
#wget https://raw.githubusercontent.com/codespell-project/codespell/master/codespell_lib/data/dictionary_rare.txt
|
||||
set +e
|
||||
misspellings=$( { codespell --quiet-level 3 --summary --count --ignore-words ${{ inputs.listIgnoredMisspelling }} --skip ${{ inputs.spellingIgnore }} -D dictionary.txt ${{ inputs.changedFiles }} > ${{ env.logdir }}codespell.log ; } 2>&1 )
|
||||
set -e
|
||||
# If codespell has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}codespell.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/codespell.json"
|
||||
cat ${{ env.logdir }}codespell.log
|
||||
echo "::remove-matcher owner=codespell::"
|
||||
fi
|
||||
echo "Found $misspellings misspellings"
|
||||
# Write the report
|
||||
if [ $misspellings -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:pencil2: Codespell found $misspellings misspellings</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: Codespell found no misspellings</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "To ignore false positives, append the word to the [.github/codespellignore](https://github.com/FreeCAD/FreeCAD/blob/master/.github/codespellignore) file (lowercase)" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}codespell.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $misspellings -eq 0 ]
|
||||
- name: Clang-tidy
|
||||
if: inputs.checkClangTidy && inputs.changedCppFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.clangTidyFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/clang_tidy.py \
|
||||
--files "${{ inputs.changedCppFiles }}" \
|
||||
--line-filter '${{ inputs.changedCppLines }}' \
|
||||
--clang-style "${{ inputs.clangStyle }}" \
|
||||
--log-dir "${{ env.logdir }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}"
|
||||
|
||||
clangTidyErrors=0
|
||||
clangTidyWarnings=0
|
||||
clangTidyNotes=0
|
||||
sudo apt-get install -y --no-install-recommends clang-tidy
|
||||
#TODO: check where this "clang-tidy.yaml" goes ; shall this be put in the fixes ?
|
||||
clang-tidy --quiet --format-style=${{ inputs.clangStyle }} --export-fixes=clang-tidy.yaml -checks=${{ inputs.clangTidyChecks }} -p build/ --explain-config &>> ${{ env.logdir }}clang-tidy-enabled-checks.log
|
||||
# Run clang-tidy on all cpp files
|
||||
set +e
|
||||
clang-tidy --quiet --format-style=${{ inputs.clangStyle }} --export-fixes=clang-tidy.yaml -checks=${{ inputs.clangTidyChecks }} -p build/ ${{ inputs.changedCppFiles }} &>> ${{ env.logdir }}clang-tidy.log
|
||||
exitCode=$?
|
||||
set -e
|
||||
# If clang-tidy has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}clang-tidy.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/clang.json"
|
||||
cat ${{ env.logdir }}clang-tidy.log
|
||||
echo "::remove-matcher owner=clang::"
|
||||
clangTidyErrors=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): error: .+$" ${{ env.logdir }}clang-tidy.log | wc -l ) || true
|
||||
clangTidyWarnings=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): warning: .+$" ${{ env.logdir }}clang-tidy.log | wc -l ) || true
|
||||
clangTidyNotes=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): note: .+$" ${{ env.logdir }}clang-tidy.log | wc -l ) || true
|
||||
fi
|
||||
echo "Found $clangTidyErrors errors, $clangTidyWarnings warnings, $clangTidyNotes notes"
|
||||
# Write the report
|
||||
if [ $clangTidyErrors -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:fire: Clang-Tidy found :fire: $clangTidyErrors errors, :warning: $clangTidyWarnings warnings and :pencil2: $clangTidyNotes notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ $clangTidyWarnings -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:warning: Clang-Tidy found :warning: $clangTidyWarnings warnings and :pencil2: $clangTidyNotes notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ $clangTidyNotes -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:pencil2: Clang-Tidy found :pencil2: $clangTidyNotes notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: Clang-Tidy found no errors, warnings or notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# List enabled checks in the report
|
||||
echo "<details><summary>:information_source: Enabled checks</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}clang-tidy-enabled-checks.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}clang-tidy.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $clangTidyErrors -eq 0 ]
|
||||
- name: Clazy
|
||||
if: inputs.checkClazy && inputs.changedCppFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.clazyFailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/clazy.py \
|
||||
--files "${{ inputs.changedCppFiles }}" \
|
||||
--clazy-checks "${{ inputs.clazyChecks }}" \
|
||||
--log-dir "${{ env.logdir }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}"
|
||||
|
||||
clazyErrors=0
|
||||
clazyWarnings=0
|
||||
clazyNotes=0
|
||||
sudo apt-get install -y --no-install-recommends clazy
|
||||
#TODO: check where this "clazy.yaml" goes ; shall this be put in the fixes ?
|
||||
# Run clazy on all cpp files
|
||||
clazy-standalone --export-fixes=clazy.yaml -checks=${{ inputs.clazyChecks }} -p build/ ${{ inputs.changedCppFiles }} &>> ${{ env.logdir }}clazy.log || true
|
||||
# If clazy has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}clazy.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/clang.json"
|
||||
cat ${{ env.logdir }}clazy.log
|
||||
echo "::remove-matcher owner=clang::"
|
||||
clazyErrors=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): error: .+$" ${{ env.logdir }}clazy.log | wc -l ) || true
|
||||
clazyWarnings=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): warning: .+$" ${{ env.logdir }}clazy.log | wc -l ) || true
|
||||
clazyNotes=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): note: .+$" ${{ env.logdir }}clazy.log | wc -l ) || true
|
||||
fi
|
||||
echo "Found $clazyErrors errors, $clazyWarnings warnings, $clazyNotes notes"
|
||||
# Write the report
|
||||
if [ "$clazyErrors" -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:fire: Clazy found :fire: $clazyErrors errors, :warning: $clazyWarnings warnings and :pencil2: $clazyNotes notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ "$clazyWarnings" -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:warning: Clazy found :warning: $clazyWarnings warnings and :pencil2: $clazyNotes notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ "$clazyNotes" -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:pencil2: Clazy found :pencil2: $clazyNotes notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: Clazy found no errors, warnings or notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "[List of checks](https://github.com/KDE/clazy#list-of-checks), [This explains some of the clazy warnings](https://www.kdab.com/uncovering-32-qt-best-practices-compile-time-clazy/) " >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}clazy.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $clazyErrors -eq 0 ]
|
||||
- name: Clazy-QT6
|
||||
if: inputs.checkClazyQT6 && inputs.changedCppFiles != '' && github.ref == inputs.QT6Branch && always()
|
||||
continue-on-error: ${{ inputs.clazyQT6FailSilent }}
|
||||
run: |
|
||||
python3 tools/lint/clazy_qt6.py \
|
||||
--files "${{ inputs.changedCppFiles }}" \
|
||||
--clazy-qt6-checks "${{ inputs.clazyQT6Checks }}" \
|
||||
--log-dir "${{ env.logdir }}" \
|
||||
--report-file "${{ env.reportdir }}${{ env.reportfilename }}"
|
||||
|
||||
# Upload steps
|
||||
|
||||
clazyQT6Errors=0
|
||||
clazyQT6Warnings=0
|
||||
clazyQT6Notes=0
|
||||
sudo apt-get install -y --no-install-recommends clazy
|
||||
#TODO: check where this "clazyQT6.yaml" goes ; shall this be put in the fixes ?
|
||||
# Run clazy checks for Qt6 on all cpp files
|
||||
clazy-standalone --export-fixes=clazyQT6.yaml -checks=${{ inputs.clazyQT6Checks }} -p build/ ${{ inputs.changedCppFiles }} &>> ${{ env.logdir }}clazyQT6.log || true
|
||||
# If clazy has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}clazyQT6.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/clang.json"
|
||||
cat ${{ env.logdir }}clazyQT6.log
|
||||
echo "::remove-matcher owner=clang::"
|
||||
clazyQT6Errors=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): error: .+$" ${{ env.logdir }}clazyQT6.log | wc -l ) || true
|
||||
clazyQT6Warnings=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): warning: .+$" ${{ env.logdir }}clazyQT6.log | wc -l ) || true
|
||||
clazyQT6Notes=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): note: .+$" ${{ env.logdir }}clazyQT6.log | wc -l ) || true
|
||||
fi
|
||||
echo "Found $clazyQT6Errors errors, $clazyQT6Warnings warnings, $clazyQT6Notes notes"
|
||||
# Write the report
|
||||
if [ "$clazyQT6Errors" -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:fire: Clazy found :fire: $clazyQT6Errors errors, :warning: $clazyQT6Warnings warnings and :pencil2: $clazyQT6Notes notes for porting to QT6</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ "$clazyQT6Warnings" -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:warning: Clazy found :warning: $clazyQT6Warnings warnings and :pencil2: $clazyQT6Notes notes for porting to QT6</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ "$clazyNotes" -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:pencil2: Clazy found :pencil2: $clazyQT6Notes notes for porting to QT6</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: Clazy found no errors, warnings or notes for porting to QT6</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}clazyQT6.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $clazyQT6Errors -eq 0 ]
|
||||
- name: Upload logs and fixes
|
||||
if: always()
|
||||
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
${{ env.fixesdir }}
|
||||
|
||||
- name: Upload report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.reportfilename }}
|
||||
path: |
|
||||
|
||||
@@ -46,16 +46,10 @@ on:
|
||||
value: ${{ jobs.Prepare.outputs.reportFile }}
|
||||
changedFiles:
|
||||
value: ${{ jobs.Prepare.outputs.changedFiles }}
|
||||
changedLines:
|
||||
value: ${{ jobs.Prepare.outputs.changedLines }}
|
||||
changedPythonFiles:
|
||||
value: ${{ jobs.Prepare.outputs.changedPythonFiles }}
|
||||
changedPythonLines:
|
||||
value: ${{ jobs.Prepare.outputs.changedPythonLines }}
|
||||
changedCppFiles:
|
||||
value: ${{ jobs.Prepare.outputs.changedCppFiles }}
|
||||
changedCppLines:
|
||||
value: ${{ jobs.Prepare.outputs.changedCppLines }}
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -73,18 +67,10 @@ jobs:
|
||||
outputs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
changedFiles: ${{ steps.Output.outputs.changedFiles }}
|
||||
changedLines: ${{ steps.Output.outputs.changedLines }}
|
||||
changedPythonFiles: ${{ steps.Output.outputs.changedPythonFiles }}
|
||||
changedPythonLines: ${{ steps.Output.outputs.changedPythonLines }}
|
||||
changedCppFiles: ${{ steps.Output.outputs.changedCppFiles }}
|
||||
changedCppLines: ${{ steps.Output.outputs.changedCppLines }}
|
||||
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
@@ -93,10 +79,6 @@ jobs:
|
||||
commitCnt=0
|
||||
touch ${{ env.logdir }}changedFiles.lst ${{ env.logdir }}changedCppFiles.lst ${{ env.logdir }}changedPythonFiles.lst
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
- name: Check out code
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: true
|
||||
- name: Determine base and head SHA in case of PR
|
||||
if: env.isPR == 'true'
|
||||
run: |
|
||||
@@ -146,22 +128,11 @@ jobs:
|
||||
commitCnt=$(jq -re '.ahead_by' ${{ env.logdir }}compare.json)
|
||||
echo "Changeset is composed of $commitCnt commit(s)" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: Get files modified in changeset #TODO check what happens with deleted file in the subsequent process
|
||||
if: env.isPR == 'true'
|
||||
env:
|
||||
API_URL: ${{ github.api_url }}
|
||||
TOKEN: ${{ github.token }}
|
||||
REPO: ${{ github.repository }}
|
||||
REF: ${{ github.ref_name }}
|
||||
PR: ${{ github.event.number }}
|
||||
if: env.isPR == 'true' || env.isPush == 'true'
|
||||
run: |
|
||||
# could reduce this to a single
|
||||
python3 tools/lint/changed_lines.py --api-url ${API_URL} --token ${TOKEN} --repo ${REPO} --ref=${REF} --pr=${PR} > ${{ env.logdir }}changedLines.lst
|
||||
cat ${{ env.logdir }}changedLines.lst | jq '.[].name' > ${{ env.logdir }}changedFiles.lst
|
||||
python3 tools/lint/changed_lines.py --api-url ${API_URL} --token ${TOKEN} --repo ${REPO} --ref=${REF} --pr=${PR} --file-filter '.py, .pyi' > ${{ env.logdir }}changedPythonLines.lst
|
||||
cat ${{ env.logdir }}changedPythonLines.lst | jq '.[].name' > ${{ env.logdir }}changedPythonFiles.lst
|
||||
python3 tools/lint/changed_lines.py --api-url ${API_URL} --token ${TOKEN} --repo ${REPO} --ref=${REF} --pr=${PR} --file-filter '.c, .cc, .cu, .cuh, .c++, .cpp, .cxx, .h, .hh, .h++, .hpp, .hxx' > ${{ env.logdir }}changedCppLines.lst
|
||||
cat ${{ env.logdir }}changedCppLines.lst | jq '.[].name' > ${{ env.logdir }}changedCppFiles.lst
|
||||
|
||||
jq '.files[] | if .status != "removed" then .filename else empty end' ${{ env.logdir }}compare.json > ${{ env.logdir }}changedFiles.lst
|
||||
grep -E '\.(py|py3)"' ${{ env.logdir }}changedFiles.lst > ${{ env.logdir }}changedPythonFiles.lst || true
|
||||
grep -E '\.(c|c\+\+|cc|cpp|cu|cuh|cxx|h|h\+\+|hh|hpp|hxx)"' ${{ env.logdir }}changedFiles.lst > ${{ env.logdir }}changedCppFiles.lst || true
|
||||
# Write the report
|
||||
echo "::group::Modified files in changeset (removed files are ignored) :" ; cat ${{ env.logdir }}changedFiles.lst ; echo "::endgroup::"
|
||||
echo "<details><summary>Modified files (removed files are ignored):</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
@@ -172,22 +143,19 @@ jobs:
|
||||
id: Output
|
||||
run: |
|
||||
echo "changedFiles=$(cat ${{ env.logdir }}changedFiles.lst | tr '\n' ' ')" >> $GITHUB_OUTPUT
|
||||
echo "changedLines=$(cat ${{ env.logdir }}changedLines.lst | tr '\n' ' ')" >> $GITHUB_OUTPUT
|
||||
echo "changedPythonFiles=$(cat ${{ env.logdir }}changedPythonFiles.lst | tr '\n' ' ')" >> $GITHUB_OUTPUT
|
||||
echo "changedPythonLines=$(cat ${{ env.logdir }}changedPythonLines.lst | tr '\n' ' ')" >> $GITHUB_OUTPUT
|
||||
echo "changedCppFiles=$(cat ${{ env.logdir }}changedCppFiles.lst | tr '\n' ' ')" >> $GITHUB_OUTPUT
|
||||
echo "changedCppLines=$(cat ${{ env.logdir }}changedCppLines.lst | tr '\n' ' ')" >> $GITHUB_OUTPUT
|
||||
echo "" >> $GITHUB_OUTPUT
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
- name: Upload report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.reportfilename }}
|
||||
path: |
|
||||
|
||||
@@ -1,170 +0,0 @@
|
||||
name: Weekly Build
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * 3"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
tag_build:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
build_tag: ${{ steps.tag_build.outputs.build_tag }}
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Checkout Source
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
fetch-depth: 2
|
||||
fetch-tags: true
|
||||
submodules: 'recursive'
|
||||
|
||||
- name: Tag Build
|
||||
id: tag_build
|
||||
shell: bash -l {0}
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
export BUILD_TAG=weekly-$(date "+%Y.%m.%d")
|
||||
echo "BUILD_TAG=${BUILD_TAG}" >> "$GITHUB_ENV"
|
||||
echo "build_tag=${BUILD_TAG}" >> "$GITHUB_OUTPUT"
|
||||
gh release create ${BUILD_TAG} --title "Development Build ${BUILD_TAG}" -F .github/workflows/weekly-build-notes.md --prerelease || true
|
||||
|
||||
- name: Upload Source
|
||||
id: upload_source
|
||||
shell: bash -l {0}
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
python3 package/rattler-build/scripts/make_version_file.py ../freecad_version.txt
|
||||
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
|
||||
git config user.name 'github-actions[bot]'
|
||||
git apply package/rattler-build/scripts/disable_git_info.patch
|
||||
git commit -a -m "Disable git info write to Version.h"
|
||||
git archive HEAD -o freecad_source_${BUILD_TAG}.tar
|
||||
git submodule foreach --recursive \
|
||||
"git archive HEAD --prefix=\$path/ -o \$sha1.tar && \
|
||||
tar -A -f \$toplevel/freecad_source_${BUILD_TAG}.tar \$sha1.tar && \
|
||||
rm \$sha1.tar"
|
||||
gzip freecad_source_${BUILD_TAG}.tar
|
||||
sha256sum freecad_source_${BUILD_TAG}.tar.gz > freecad_source_${BUILD_TAG}.tar.gz-SHA256.txt
|
||||
gh release upload --clobber ${BUILD_TAG} "freecad_source_${BUILD_TAG}.tar.gz" "freecad_source_${BUILD_TAG}.tar.gz-SHA256.txt"
|
||||
|
||||
build:
|
||||
needs: tag_build
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- { target: linux-64, os: ubuntu-22.04 }
|
||||
- { target: linux-arm64, os: ubuntu-22.04-arm }
|
||||
- { target: osx-64, os: macos-13 }
|
||||
- { target: osx-arm64, os: macos-latest }
|
||||
- { target: win-64, os: windows-latest }
|
||||
fail-fast: false
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
environment: weekly-build
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
# prevent running out of disk space on Ubuntu runners.
|
||||
- name: Maximize build space
|
||||
if: runner.os == 'Linux'
|
||||
uses: AdityaGarg8/remove-unwanted-software@90e01b21170618765a73370fcc3abbd1684a7793 # v5
|
||||
with:
|
||||
verbose: 'true'
|
||||
remove-android: 'true' # (frees ~9 GB)
|
||||
remove-cached-tools: 'true' # (frees ~8.3 GB)
|
||||
|
||||
- name: Set Platform Environment Variables
|
||||
shell: bash -l {0}
|
||||
env:
|
||||
BUILD_TAG: ${{ needs.tag_build.outputs.build_tag }}
|
||||
OPERATING_SYSTEM: ${{ runner.os }}
|
||||
run: |
|
||||
echo "BUILD_TAG=${BUILD_TAG}" >> "$GITHUB_ENV"
|
||||
if [[ $OPERATING_SYSTEM == 'Windows' ]]; then
|
||||
echo 'PIXI_CACHE_DIR=D:\rattler' >> "$GITHUB_ENV"
|
||||
echo 'RATTLER_CACHE_DIR=D:\rattler' >> "$GITHUB_ENV"
|
||||
fi
|
||||
|
||||
- name: Checkout Source
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
fetch-depth: 2
|
||||
fetch-tags: true
|
||||
submodules: 'recursive'
|
||||
|
||||
- uses: prefix-dev/setup-pixi@82d477f15f3a381dbcc8adc1206ce643fe110fb7 # v0.9.3
|
||||
with:
|
||||
pixi-version: v0.59.0
|
||||
cache: false
|
||||
|
||||
- name: Install the Apple certificate and provisioning profile
|
||||
if: runner.os == 'macOS'
|
||||
env:
|
||||
APP_SPECIFIC_PASSWORD: ${{ secrets.APP_SPECIFIC_PASSWORD }}
|
||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
|
||||
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }}
|
||||
DEVELOPER_TEAM_ID: ${{ secrets.DEVELOPER_TEAM_ID }}
|
||||
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
||||
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
|
||||
run: |
|
||||
# create variables
|
||||
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
|
||||
PP_PATH=$RUNNER_TEMP/FreeCAD_Weekly.provisionprofile
|
||||
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
|
||||
|
||||
export KEYCHAIN_PASSWORD=$(openssl rand -base64 8)
|
||||
|
||||
# import certificate and provisioning profile from secrets
|
||||
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH
|
||||
echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH
|
||||
|
||||
# create temporary keychain
|
||||
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
||||
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
|
||||
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
||||
|
||||
# import certificate to keychain
|
||||
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
|
||||
security set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
||||
security list-keychain -d user -s $KEYCHAIN_PATH
|
||||
|
||||
# apply provisioning profile
|
||||
mkdir -p ~/Library/Provisioning\ Profiles
|
||||
cp $PP_PATH ~/Library/Provisioning\ Profiles
|
||||
|
||||
xcrun notarytool store-credentials "FreeCAD" --keychain "$KEYCHAIN_PATH" --apple-id "${APPLE_ID}" --password "${APP_SPECIFIC_PASSWORD}" --team-id "${DEVELOPER_TEAM_ID}"
|
||||
|
||||
- name: Build and Release Packages
|
||||
shell: bash
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
|
||||
SIGN_RELEASE: "true"
|
||||
TARGET_PLATFORM: ${{ matrix.target }}
|
||||
UPLOAD_RELEASE: "true"
|
||||
run: |
|
||||
python3 package/rattler-build/scripts/make_version_file.py ../freecad_version.txt
|
||||
git apply package/rattler-build/scripts/disable_git_info.patch
|
||||
cd package/rattler-build
|
||||
pixi install
|
||||
pixi run -e package create_bundle
|
||||
|
||||
## Needed if running on a self-hosted runner:
|
||||
# - name: Clean up keychain and provisioning profile
|
||||
# if: ${{ always() }}
|
||||
# run: |
|
||||
# security delete-keychain $RUNNER_TEMP/app-signing.keychain-db
|
||||
# rm ~/Library/MobileDevice/Provisioning\ Profiles/build_pp.mobileprovision
|
||||
@@ -39,9 +39,6 @@ on:
|
||||
type: string
|
||||
required: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
|
||||
WrapUp:
|
||||
@@ -53,16 +50,11 @@ jobs:
|
||||
shell: bash
|
||||
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Make needed directories, files and initializations
|
||||
run: |
|
||||
mkdir -p ${{ env.artifactsDownloadDir }}
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: ${{ env.artifactsDownloadDir }}
|
||||
- name: Save input data to file
|
||||
@@ -119,7 +111,7 @@ jobs:
|
||||
cat report.md >> $GITHUB_STEP_SUMMARY
|
||||
- name: Delete used artifacts
|
||||
continue-on-error: true
|
||||
uses: geekyeggo/delete-artifact@f275313e70c08f6120db482d7a6b98377786765b # v5.1.0
|
||||
uses: geekyeggo/delete-artifact@v5
|
||||
with:
|
||||
name: |
|
||||
${{ env.usedArtifacts }}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
> [!IMPORTANT]
|
||||
> Bleeding edge FreeCAD development builds for testing bugfixes, regressions, and recently implemented features. Do not use in a production environment.
|
||||
|
||||
|
||||
### How-to use
|
||||
|
||||
1. Download the appropriate asset for your OS below
|
||||
2. Unpack the bundle to any folder on your system
|
||||
3. Launch the application
|
||||
- **Windows**
|
||||
Run `\bin\FreeCAD.exe` in the extracted directory
|
||||
- **macOS**
|
||||
Launch `/FreeCAD.app` in the extracted directory
|
||||
- **Linux**
|
||||
Open the `*.AppImage`
|
||||
@@ -1,6 +1,5 @@
|
||||
# file types to ignore
|
||||
.*
|
||||
!/.packit.yaml
|
||||
!/.clang-format
|
||||
!/.clang-tidy
|
||||
!/.git-blame-ignore-revs
|
||||
@@ -26,8 +25,6 @@
|
||||
*.o
|
||||
*.orig
|
||||
*.output
|
||||
# Ignore .db files created by Qt Designer when editing .ui files
|
||||
*.db
|
||||
qrc_*.cpp
|
||||
BuildLog.htm
|
||||
cmake_install.cmake
|
||||
@@ -48,7 +45,6 @@ install_manifest.txt
|
||||
/Mod/
|
||||
/ZERO_CHECK.dir/
|
||||
/build/
|
||||
/build-*/
|
||||
/cmake-build*/
|
||||
/src/Tools/offlinedoc/localwiki/
|
||||
/src/Tools/offlinedoc/*.txt
|
||||
@@ -59,8 +55,6 @@ tags
|
||||
/CMakeUserPresets.json
|
||||
Testing
|
||||
compile_commands.json
|
||||
*.sublime-project
|
||||
*.sublime-workspace
|
||||
|
||||
# crowdin file
|
||||
src/Tools/freecad.zip
|
||||
|
||||
+1
-4
@@ -1,12 +1,9 @@
|
||||
[submodule "src/3rdParty/OndselSolver"]
|
||||
path = src/3rdParty/OndselSolver
|
||||
url = https://github.com/FreeCAD/OndselSolver.git
|
||||
url = https://github.com/Ondsel-Development/OndselSolver.git
|
||||
[submodule "tests/lib"]
|
||||
path = tests/lib
|
||||
url = https://github.com/google/googletest
|
||||
[submodule "src/3rdParty/GSL"]
|
||||
path = src/3rdParty/GSL
|
||||
url = https://github.com/microsoft/GSL
|
||||
[submodule "src/Mod/AddonManager"]
|
||||
path = src/Mod/AddonManager
|
||||
url = https://github.com/FreeCAD/AddonManager.git
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
specfile_path: package/fedora/freecad.spec
|
||||
files_to_sync:
|
||||
- .packit.yaml
|
||||
actions:
|
||||
post-upstream-clone:
|
||||
- bash -c 'BUILD_TAG=dev /usr/bin/python3 package/rattler-build/scripts/make_version_file.py freecad_version.txt'
|
||||
- rm -f freecad-sources.tar.gz
|
||||
changelog-entry:
|
||||
- bash -c 'git log --no-merges --pretty="format:- %s (%an)" $(git describe --tags --abbrev=0 )..HEAD -- |sed 's/%/%%/g''
|
||||
create-archive:
|
||||
- git submodule update --init
|
||||
- bash -c 'git ls-files --recurse-submodules | tar -caf freecad-sources.tar.gz -T-'
|
||||
- echo -n 'freecad-sources.tar.gz'
|
||||
downstream_package_name: freecad
|
||||
additional_packages:
|
||||
- python3
|
||||
|
||||
jobs:
|
||||
- job: copr_build
|
||||
identifier: pull_request
|
||||
trigger: pull_request
|
||||
notifications:
|
||||
pull_request:
|
||||
successful_build: True
|
||||
branch: main
|
||||
additional_repos:
|
||||
- copr://bpostle/IfcOpenShell
|
||||
manual_trigger: true
|
||||
targets:
|
||||
fedora-stable:
|
||||
without_opts:
|
||||
- debug_info
|
||||
fedora-development:
|
||||
without_opts:
|
||||
- debug_info
|
||||
|
||||
- job: tests
|
||||
identifier: pull_request
|
||||
trigger: pull_request
|
||||
branch: main
|
||||
manual_trigger: true
|
||||
targets:
|
||||
fedora-latest-stable:
|
||||
without_opts:
|
||||
- debug_info
|
||||
fmf_path: package/fedora/tests
|
||||
|
||||
- job: copr_build
|
||||
identifier: main
|
||||
trigger: commit
|
||||
manual_trigger: true
|
||||
branch: main
|
||||
additional_repos:
|
||||
- copr://bpostle/IfcOpenShell
|
||||
owner: freecad
|
||||
project: nightly
|
||||
|
||||
- job: copr_build
|
||||
identifier: release
|
||||
trigger: release
|
||||
owner: freecad
|
||||
project: freecad
|
||||
additional_repos:
|
||||
- copr://bpostle/IfcOpenShell
|
||||
targets:
|
||||
fedora-all:
|
||||
without_opts:
|
||||
- tests
|
||||
+10
-20
@@ -4,26 +4,23 @@
|
||||
# See https://pre-commit.com/hooks.html for more hooks
|
||||
files: |
|
||||
(?x)^(
|
||||
.github|
|
||||
src/Base|
|
||||
src/Gui|
|
||||
src/Main|
|
||||
src/Tools|
|
||||
tests/src|
|
||||
src/Mod/AddonManager|
|
||||
src/Mod/Assembly|
|
||||
src/Mod/BIM|
|
||||
src/Mod/CAM|
|
||||
src/Mod/Cloud|
|
||||
src/Mod/Draft|
|
||||
src/Mod/Drawing|
|
||||
src/Mod/Fem|
|
||||
src/Mod/Help|
|
||||
src/Mod/Import|
|
||||
src/Mod/Inspection|
|
||||
src/Mod/JtReader|
|
||||
src/Mod/Measure|
|
||||
src/Mod/MeshPart|
|
||||
src/Mod/Mesh|
|
||||
src/Mod/PartDesign|
|
||||
src/Mod/Part|
|
||||
src/Mod/MeshPart|
|
||||
src/Mod/Plot|
|
||||
src/Mod/Points|
|
||||
src/Mod/ReverseEngineering|
|
||||
@@ -35,8 +32,7 @@ files: |
|
||||
src/Mod/Surface|
|
||||
src/Mod/Test|
|
||||
src/Mod/Tux|
|
||||
src/Mod/Web|
|
||||
tests/src
|
||||
src/Mod/Web
|
||||
)
|
||||
exclude: |
|
||||
(?x)^(
|
||||
@@ -46,34 +42,28 @@ exclude: |
|
||||
src/App/ExpressionParser.tab.h|
|
||||
src/App/ExpressionParser.y|
|
||||
src/App/lex.ExpressionParser.c|
|
||||
src/Gui/3Dconnexion/navlib|
|
||||
src/Gui/QSint|
|
||||
src/Gui/Quarter|
|
||||
src/Mod/Fem/femexamples|
|
||||
src/Mod/Import/App/SCL|
|
||||
src/Mod/Import/App/SCL_output|
|
||||
src/Mod/Mesh/App/TestData|
|
||||
src/Mod/Mesh/App/WildMagic4|
|
||||
src/Mod/Robot/App/kdl_cp|
|
||||
src/Mod/Robot/Lib|
|
||||
.*\.ts$|
|
||||
.*\.brep$
|
||||
src/Mod/Robot/Lib
|
||||
)
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
|
||||
rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # frozen: v4.6.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
- id: end-of-file-fixer
|
||||
- id: check-yaml
|
||||
- id: check-added-large-files
|
||||
- id: mixed-line-ending
|
||||
- repo: https://github.com/psf/black-pre-commit-mirror
|
||||
rev: 2892f1f81088477370d4fbc56545c05d33d2493f # frozen: 25.11.0
|
||||
- repo: https://github.com/psf/black
|
||||
rev: b965c2a5026f8ba399283ba3e01898b012853c79 # frozen: 24.8.0
|
||||
hooks:
|
||||
- id: black
|
||||
args: ['--line-length', '100']
|
||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||
rev: 317810f3c6a0ad3572367dc86cb6e41863e16e08 # frozen: v21.1.5
|
||||
rev: 7d85583be209cb547946c82fbe51f4bc5dd1d017 # frozen: v18.1.8
|
||||
hooks:
|
||||
- id: clang-format
|
||||
|
||||
+17
-43
@@ -1,42 +1,21 @@
|
||||
# As of February 2025 we require CMake 3.22.0
|
||||
cmake_minimum_required(VERSION 3.22.0 FATAL_ERROR)
|
||||
# As of January 2023 we require CMake 3.16.3
|
||||
# see https://forum.freecad.org/viewtopic.php?f=10&t=72173
|
||||
# for further info why
|
||||
cmake_minimum_required(VERSION 3.16.3 FATAL_ERROR)
|
||||
|
||||
# policy CMP0072 was introduced with CMake 3.11
|
||||
# relates to FindOpenGL module
|
||||
# and cache variables OPENGL_gl_LIBRARY, OPENGL_glu_LIBRARY
|
||||
if (POLICY CMP0072)
|
||||
set(OpenGL_GL_PREFERENCE LEGACY)
|
||||
endif(POLICY CMP0072)
|
||||
|
||||
# As of cMake 3.27, find_package() will look for both case-sensitive and all-uppercase versions
|
||||
# of the package. This seems to affect FLANN as included by Pixi
|
||||
if(POLICY CMP0144)
|
||||
cmake_policy(SET CMP0144 NEW)
|
||||
endif()
|
||||
|
||||
# FindPythonInterp and FindPythonLibs modules are deprecated, but are still in use by
|
||||
# all versions of Shiboken2. This policy must be kept at OLD until Shiboken2 is no longer
|
||||
# supported
|
||||
if(POLICY CMP0148)
|
||||
# FindPythonInterp and FindPythonLibs modules are deprecated.
|
||||
# Currently, they are still used by shiboken's CMake files
|
||||
if (POLICY CMP0148)
|
||||
cmake_policy(SET CMP0148 OLD)
|
||||
endif()
|
||||
|
||||
# The exec_program command was deprecated in cMake 3.0, and policy CMP0153 was added in cMake
|
||||
# 3.28 to control whether this gives a warning (the OLD behavior) or a fatal error (NEW)
|
||||
if(POLICY CMP0153)
|
||||
cmake_policy(SET CMP0153 NEW)
|
||||
endif()
|
||||
|
||||
# Suppress 'FindBoost module is removed' warning. Will use BoostConfig.cmake instead
|
||||
if(POLICY CMP0167)
|
||||
cmake_policy(SET CMP0167 NEW)
|
||||
endif()
|
||||
|
||||
# As of cMake 3.31 add_custom_command() rejects invalid arguments
|
||||
if(POLICY CMP0175)
|
||||
cmake_policy(SET CMP0175 NEW)
|
||||
endif()
|
||||
|
||||
# Added in cMake 3.31, enforce normalization of all DESTINATION paths given to install()
|
||||
if(POLICY CMP0177)
|
||||
cmake_policy(SET CMP0177 NEW)
|
||||
endif()
|
||||
|
||||
|
||||
option(FREECAD_USE_CCACHE "Auto detect and use ccache during compilation" ON)
|
||||
|
||||
if(FREECAD_USE_CCACHE)
|
||||
@@ -51,9 +30,9 @@ endif()
|
||||
project(FreeCAD)
|
||||
|
||||
set(PACKAGE_VERSION_MAJOR "1")
|
||||
set(PACKAGE_VERSION_MINOR "1")
|
||||
set(PACKAGE_VERSION_PATCH "0") # number of patch release (e.g. "4" for the 0.18.4 release)
|
||||
set(PACKAGE_VERSION_SUFFIX "dev") # either "dev" for development snapshot or "" (empty string)
|
||||
set(PACKAGE_VERSION_MINOR "0")
|
||||
set(PACKAGE_VERSION_PATCH "2") # number of patch release (e.g. "4" for the 0.18.4 release)
|
||||
set(PACKAGE_VERSION_SUFFIX "") # either "dev" for development snapshot or "" (empty string)
|
||||
set(PACKAGE_BUILD_VERSION "0") # used when the same FreeCAD version will be re-released (for example using an updated LibPack)
|
||||
|
||||
set(PACKAGE_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}.${PACKAGE_VERSION_PATCH}")
|
||||
@@ -76,8 +55,6 @@ FreeCADLibpackChecks()
|
||||
SetupDoxygen()
|
||||
SetupLibFmt()
|
||||
SetupYamlCpp()
|
||||
SetupZipIos()
|
||||
find_package(ICU REQUIRED COMPONENTS uc i18n)
|
||||
if(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER OR FREECAD_LIBPACK_CHECKFILE_VERSION)
|
||||
SetupPython()
|
||||
SetupPCL()
|
||||
@@ -92,6 +69,7 @@ if(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER OR FREECAD_LIB
|
||||
# OPENGL_gl_LIBRARY empty that results into linker errors
|
||||
SetupOpenGL()
|
||||
endif(BUILD_GUI)
|
||||
SetupBoost()
|
||||
SetupSalomeSMESH()
|
||||
if (BUILD_FEM_NETGEN)
|
||||
find_package(NETGEN)
|
||||
@@ -107,14 +85,10 @@ if(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER OR FREECAD_LIB
|
||||
|
||||
if(BUILD_GUI)
|
||||
SetupCoin3D()
|
||||
SetupPivy()
|
||||
SetupSpaceball()
|
||||
SetupShibokenAndPyside()
|
||||
SetupMatplotlib()
|
||||
endif(BUILD_GUI)
|
||||
|
||||
# SetupCoin3D can overwrite find_package(Boost) output so keep this after.
|
||||
SetupBoost()
|
||||
endif()
|
||||
|
||||
if(BUILD_VR)
|
||||
|
||||
+38
-189
@@ -13,18 +13,6 @@
|
||||
"CMAKE_EXPORT_COMPILE_COMMANDS": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
},
|
||||
"CMAKE_JOB_POOL_COMPILE": {
|
||||
"type": "STRING",
|
||||
"value": "compile_jobs"
|
||||
},
|
||||
"CMAKE_JOB_POOL_LINK": {
|
||||
"type": "STRING",
|
||||
"value": "link_jobs"
|
||||
},
|
||||
"CMAKE_POLICY_VERSION_MINIMUM": {
|
||||
"type": "STRING",
|
||||
"value": "3.5"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -71,10 +59,6 @@
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
},
|
||||
"BUILD_REVERSEENGINEERING": {
|
||||
"type": "BOOL",
|
||||
"value": "OFF"
|
||||
},
|
||||
"ENABLE_DEVELOPER_TESTS": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
@@ -121,38 +105,31 @@
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Linux"
|
||||
},
|
||||
"cmakeExecutable": "${sourceDir}/conda/cmake.sh",
|
||||
"cacheVariables": {
|
||||
"CMAKE_C_COMPILER": {
|
||||
"type": "STRING",
|
||||
"value": "clang"
|
||||
"CMAKE_INCLUDE_PATH": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/include"
|
||||
},
|
||||
"CMAKE_CXX_COMPILER": {
|
||||
"type": "STRING",
|
||||
"value": "clang++"
|
||||
},
|
||||
"CMAKE_EXE_LINKER_FLAGS": {
|
||||
"type": "STRING",
|
||||
"value": "-fuse-ld=mold"
|
||||
"CMAKE_INSTALL_LIBDIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/lib"
|
||||
},
|
||||
"CMAKE_INSTALL_PREFIX": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}"
|
||||
},
|
||||
"CMAKE_LIBRARY_PATH":{
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/lib"
|
||||
},
|
||||
"CMAKE_PREFIX_PATH": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}"
|
||||
},
|
||||
"CMAKE_SHARED_LINKER_FLAGS": {
|
||||
"type": "STRING",
|
||||
"value": "-fuse-ld=mold"
|
||||
},
|
||||
"OCC_INCLUDE_DIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/include/opencascade"
|
||||
},
|
||||
"OCC_LIBRARY_DIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/lib"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -164,30 +141,35 @@
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Darwin"
|
||||
},
|
||||
"cmakeExecutable": "${sourceDir}/conda/cmake.sh",
|
||||
"cacheVariables": {
|
||||
"CMAKE_IGNORE_PREFIX_PATH": {
|
||||
"type": "STRING",
|
||||
"value": "/opt/homebrew;/usr/local/homebrew"
|
||||
},
|
||||
"CMAKE_INCLUDE_PATH": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/include"
|
||||
},
|
||||
"CMAKE_INSTALL_LIBDIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/lib"
|
||||
},
|
||||
"CMAKE_INSTALL_PREFIX": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}"
|
||||
},
|
||||
"CMAKE_LIBRARY_PATH":{
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/lib"
|
||||
},
|
||||
"CMAKE_PREFIX_PATH": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}"
|
||||
},
|
||||
"FREECAD_3DCONNEXION_SUPPORT": {
|
||||
"type": "STRING",
|
||||
"value": "Both"
|
||||
},
|
||||
"OCC_INCLUDE_DIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/include/opencascade"
|
||||
},
|
||||
"OCC_LIBRARY_DIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/lib"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -199,26 +181,31 @@
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
},
|
||||
"cmakeExecutable": "${sourceDir}/conda/cmake.cmd",
|
||||
"cacheVariables": {
|
||||
"CMAKE_INCLUDE_PATH": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/Library/include"
|
||||
},
|
||||
"CMAKE_INSTALL_LIBDIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/Library/lib"
|
||||
},
|
||||
"CMAKE_INSTALL_PREFIX": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/Library"
|
||||
},
|
||||
"CMAKE_LIBRARY_PATH":{
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/Library/lib"
|
||||
},
|
||||
"CMAKE_PREFIX_PATH": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/Library"
|
||||
},
|
||||
"FREECAD_3DCONNEXION_SUPPORT": {
|
||||
"type": "STRING",
|
||||
"value": "Both"
|
||||
},
|
||||
"OCC_INCLUDE_DIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/Library/include/opencascade"
|
||||
},
|
||||
"OCC_LIBRARY_DIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{CONDA_PREFIX}/Library/lib"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -307,144 +294,6 @@
|
||||
"value": "OFF"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rpm",
|
||||
"description": "Settings like rpm build",
|
||||
"displayName": "rpm",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build/rpm",
|
||||
"cacheVariables": {
|
||||
"CMAKE_INSTALL_DATAROOTDIR": {
|
||||
"type": "PATH",
|
||||
"value": "/usr/share"
|
||||
},
|
||||
"CMAKE_C_FLAGS_RELEASE": {
|
||||
"type": "STRING",
|
||||
"value": "-DNDEBUG"
|
||||
},
|
||||
"CMAKE_CXX_FLAGS_RELEASE": {
|
||||
"type": "STRING",
|
||||
"value": "-DNDEBUG"
|
||||
},
|
||||
"CMAKE_Fortran_FLAGS_RELEASE": {
|
||||
"type": "STRING",
|
||||
"value": "-DNDEBUG"
|
||||
},
|
||||
"CMAKE_VERBOSE_MAKEFILE": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
},
|
||||
"CMAKE_INSTALL_DO_STRIP": {
|
||||
"type": "BOOL",
|
||||
"value": "OFF"
|
||||
},
|
||||
"CMAKE_INSTALL_PREFIX": {
|
||||
"type": "PATH",
|
||||
"value": "/usr/lib64/freecad"
|
||||
},
|
||||
"CMAKE_INSTALL_FULL_SBINDIR": {
|
||||
"type": "PATH",
|
||||
"value": "/usr/bin"
|
||||
},
|
||||
"CMAKE_INSTALL_SBINDIR": {
|
||||
"type": "PATH",
|
||||
"value": "bin"
|
||||
},
|
||||
"INCLUDE_INSTALL_DIR": {
|
||||
"type": "PATH",
|
||||
"value": "/usr/include"
|
||||
},
|
||||
"LIB_INSTALL_DIR": {
|
||||
"type": "PATH",
|
||||
"value": "/usr/lib64"
|
||||
},
|
||||
"SYSCONF_INSTALL_DIR": {
|
||||
"type": "PATH",
|
||||
"value": "/etc"
|
||||
},
|
||||
"SHARE_INSTALL_PREFIX": {
|
||||
"type": "PATH",
|
||||
"value": "/usr/share"
|
||||
},
|
||||
"LIB_SUFFIX": {
|
||||
"type": "STRING",
|
||||
"value": "64"
|
||||
},
|
||||
"BUILD_SHARED_LIBS": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
},
|
||||
"CMAKE_INSTALL_DOCDIR": {
|
||||
"type": "PATH",
|
||||
"value": "/usr/share/doc/freecad"
|
||||
},
|
||||
"CMAKE_INSTALL_INCLUDEDIR": {
|
||||
"type": "PATH",
|
||||
"value": "/usr/include"
|
||||
},
|
||||
"RESOURCEDIR": {
|
||||
"type": "PATH",
|
||||
"value": "/usr/share/freecad"
|
||||
},
|
||||
"FREECAD_USE_EXTERNAL_PIVY": {
|
||||
"type": "BOOL",
|
||||
"value": "TRUE"
|
||||
},
|
||||
"FREECAD_USE_EXTERNAL_FMT": {
|
||||
"type": "BOOL",
|
||||
"value": "TRUE"
|
||||
},
|
||||
"FREECAD_USE_PCL": {
|
||||
"type": "BOOL",
|
||||
"value": "OFF"
|
||||
},
|
||||
"FREECAD_QT_VERSION": {
|
||||
"type": "STRING",
|
||||
"value": "6"
|
||||
},
|
||||
"OpenGL_GL_PREFERENCE": {
|
||||
"type": "STRING",
|
||||
"value": "GLVND"
|
||||
},
|
||||
"USE_OCC": {
|
||||
"type": "BOOL",
|
||||
"value": "TRUE"
|
||||
},
|
||||
"PYCXX_INCLUDE_DIR": {
|
||||
"type": "PATH",
|
||||
"value": "/usr/include"
|
||||
},
|
||||
"PYCXX_SOURCE_DIR": {
|
||||
"type": "PATH",
|
||||
"value": "/usr/src/CXX"
|
||||
},
|
||||
"ENABLE_DEVELOPER_TESTS": {
|
||||
"type": "BOOL",
|
||||
"value": "TRUE"
|
||||
},
|
||||
"FREECAD_USE_EXTERNAL_GTEST": {
|
||||
"type": "BOOL",
|
||||
"value": "TRUE"
|
||||
},
|
||||
"ONDSELSOLVER_BUILD_EXE": {
|
||||
"type": "BOOL",
|
||||
"value": "TRUE"
|
||||
},
|
||||
"BUILD_GUI": {
|
||||
"type": "BOOL",
|
||||
"value": "TRUE"
|
||||
}
|
||||
},
|
||||
"environment": {
|
||||
"CC": "gcc",
|
||||
"CXX": "g++",
|
||||
"LT_SYS_LIBRARY_PATH": "/usr/lib64:",
|
||||
"CCACHE_PROGRAM": "/usr/bin/ccache",
|
||||
"CFLAGS": "-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer",
|
||||
"CXXFLAGS": "-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer",
|
||||
"LDFLAGS": "-Wl,--as-needed -Wl,--no-undefined"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+8
-15
@@ -26,7 +26,7 @@ The FreeCAD Contribution Process is expressed here with the following specific g
|
||||
1. FreeCAD uses the git distributed revision control system.
|
||||
2. Source code for the main application and related subprojects is hosted on github.com in the FreeCAD organization.
|
||||
3. Problems are discrete, well-defined limitations or bugs.
|
||||
4. FreeCAD uses GitHub's issue-tracking system to track problems and contributions. For help requests and general discussions, use the project forum.
|
||||
4. FreeCAD uses GitHub's issue-tracking system to track problems and contributions. For help requests and general discussions, use the project forum.
|
||||
5. Contributions are sets of code changes that resolve a single problem.
|
||||
6. FreeCAD uses the Pull Request workflow for evaluating and accepting contributions.
|
||||
|
||||
@@ -47,7 +47,7 @@ The FreeCAD Contribution Process is expressed here with the following specific g
|
||||
## 5. Contribution Requirements
|
||||
|
||||
1. Contributions are submitted in the form of Pull Requests (PR).
|
||||
2. Maintainers and Contributors MUST have a GitHub account and SHOULD use their real names or a well-known alias.
|
||||
2. Maintainers and Contributors MUST have a GitHub account and SHOULD use their real names or a well-known alias.
|
||||
3. If the GitHub username differs from the username on the FreeCAD Forum, effort SHOULD be taken to avoid confusion.
|
||||
4. A PR SHOULD be a minimal and accurate answer to exactly one identified and agreed-on problem.
|
||||
5. A PR SHOULD refrain from adding additional dependencies to the FreeCAD project unless no other option is available.
|
||||
@@ -55,14 +55,9 @@ The FreeCAD Contribution Process is expressed here with the following specific g
|
||||
7. If a PR contains multiple commits, each commit MUST compile cleanly when merged with all previous commits of the same PR. Each commit SHOULD add value to the history of the project. Checkpoint commits SHOULD be squashed.
|
||||
8. A PR SHALL NOT include non-trivial code from other projects unless the Contributor is the original author of that code.
|
||||
9. A PR MUST compile cleanly and pass project self-tests on all target platforms.
|
||||
10. Changes that break python API used by extensions SHALL be avoided. If it is not possible to avoid breaking changes, the amount of them MUST be minimized and PR MUST clearly describe all breaking changes with clear description on how to replace no longer working solution with newer one. Contributor SHOULD search for addons that will be broken and list them in the PR.
|
||||
11. Each commit message in a PR MUST succinctly explain what the commit achieves. The commit message SHALL follow the suggestions in the `git commit --help` documentation, section DISCUSSION.
|
||||
12. The PR Title MUST succinctly explain what the PR achieves. The Body MAY be as detailed as needed. If a PR changes the user interface (UI), the body of the text MUST include a presentation of these UI changes, preferably with screenshots of the previous and revised state.
|
||||
13. If a PR contains the work of another author (for example, if it is cherry-picked from a fork by someone other than the PR-submitter):
|
||||
1. the PR description MUST contain proper attribution as the first line, for example: "This is work of XYZ cherry-picked from <link>";
|
||||
2. all commits MUST have proper authorship, i.e. be authored by the original author and committed by the author of the PR;
|
||||
3. if changes to cherry-picked commits are necessary they SHOULD be done as follow-up commits. If it is not possible to do so, then the modified commits MUST contain a `Co-Authored-By` trailer in their commit message.
|
||||
14. A “Valid PR” is one which satisfies the above requirements.
|
||||
10. Each commit message in a PR MUST succinctly explain what the commit achieves. The commit message SHALL follow the suggestions in the `git commit --help` documentation, section DISCUSSION.
|
||||
11. The PR message MUST consist of a single short line, the PR Title, summarizing the problem being solved, followed by a blank line and then the proposed solution in the Body. If a PR consists of more than one commit, the PR Title MUST succinctly explain what the PR achieves. The Body MAY be as detailed as needed. If a PR changes the user interface (UI), the body of the text MUST include a presentation of these UI changes, preferably with screenshots of the previous and revised state.
|
||||
12. A “Valid PR” is one which satisfies the above requirements.
|
||||
|
||||
## 6. Process
|
||||
|
||||
@@ -86,11 +81,9 @@ The FreeCAD Contribution Process is expressed here with the following specific g
|
||||
2. capture toxic contributions in the historical record
|
||||
3. engage with the Contributor on improving their contribution quality.
|
||||
14. Maintainers SHALL NOT make value judgments on correct contributions.
|
||||
15. If a PR requires significant further work before merging, the PR SHOULD be moved to draft status.
|
||||
16. If a PR is complete, but should not be merged yet (for example, because it depends on another in-process PR), the "On hold" label SHOULD be applied.
|
||||
17. Any Contributor who has value judgments on a PR SHOULD express these via their own PR.
|
||||
18. The User who created an issue SHOULD close the issue after checking the PR is successful.
|
||||
19. Maintainers SHOULD close issues that are left open without action or update for an unreasonable period.
|
||||
15. Any Contributor who has value judgments on a PR SHOULD express these via their own PR.
|
||||
16. The User who created an issue SHOULD close the issue after checking the PR is successful.
|
||||
17. Maintainers SHOULD close issues that are left open without action or update for an unreasonable period.
|
||||
|
||||
## 7. Branches and Releases
|
||||
|
||||
|
||||
@@ -1,125 +1,113 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
51 Franklin Street - Fifth Floor
|
||||
Boston, MA 02110-1301, USA.
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
[This is the first released version of the library GPL. It is
|
||||
numbered 2 because it goes with version 2 of the ordinary GPL.]
|
||||
|
||||
Preamble
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
This license, the Library General Public License, applies to some
|
||||
specially designated Free Software Foundation software, and to any
|
||||
other libraries whose authors decide to use it. You can use it for
|
||||
your libraries, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if
|
||||
you distribute copies of the library, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
code. If you link a program with the library, you must provide
|
||||
complete object files to the recipients so that they can relink them
|
||||
with the library, after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
Our method of protecting your rights has two steps: (1) copyright
|
||||
the library, and (2) offer you this license which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
Also, for each distributor's protection, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
library. If the library is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original
|
||||
version, so that any problems introduced by others will not reflect on
|
||||
the original authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that companies distributing free
|
||||
software will individually obtain patent licenses, thus in effect
|
||||
transforming the program into proprietary software. To prevent this,
|
||||
we have made it clear that any patent must be licensed for everyone's
|
||||
free use or not licensed at all.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
Most GNU software, including some libraries, is covered by the ordinary
|
||||
GNU General Public License, which was designed for utility programs. This
|
||||
license, the GNU Library General Public License, applies to certain
|
||||
designated libraries. This license is quite different from the ordinary
|
||||
one; be sure to read it in full, and don't assume that anything in it is
|
||||
the same as in the ordinary license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
The reason we have a separate public license for some libraries is that
|
||||
they blur the distinction we usually make between modifying or adding to a
|
||||
program and simply using it. Linking a program with a library, without
|
||||
changing the library, is in some sense simply using the library, and is
|
||||
analogous to running a utility program or application program. However, in
|
||||
a textual and legal sense, the linked executable is a combined work, a
|
||||
derivative of the original library, and the ordinary General Public License
|
||||
treats it as such.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
Because of this blurred distinction, using the ordinary General
|
||||
Public License for libraries did not effectively promote software
|
||||
sharing, because most developers did not use the libraries. We
|
||||
concluded that weaker conditions might promote sharing better.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
However, unrestricted linking of non-free programs would deprive the
|
||||
users of those programs of all benefit from the free status of the
|
||||
libraries themselves. This Library General Public License is intended to
|
||||
permit developers of non-free programs to use free libraries, while
|
||||
preserving your freedom as a user of such programs to change the free
|
||||
libraries that are incorporated in them. (We have not seen how to achieve
|
||||
this as regards changes in header files, but we have achieved it as regards
|
||||
changes in the actual functions of the Library.) The hope is that this
|
||||
will lead to faster development of free libraries.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
former contains code derived from the library, while the latter only
|
||||
works together with the library.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Note that it is possible for a library to be covered by the ordinary
|
||||
General Public License rather than by this special one.
|
||||
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
0. This License Agreement applies to any software library which
|
||||
contains a notice placed by the copyright holder or other authorized
|
||||
party saying it may be distributed under the terms of this Library
|
||||
General Public License (also called "this License"). Each licensee is
|
||||
addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
@@ -146,7 +134,7 @@ such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
@@ -158,7 +146,7 @@ Library.
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
@@ -216,7 +204,7 @@ instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
@@ -267,8 +255,8 @@ Library will still fall under Section 6.)
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
|
||||
6. As an exception to the Sections above, you may also compile or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
@@ -295,31 +283,23 @@ of these things:
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
b) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
c) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
d) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
the source code distributed need not include anything that is normally
|
||||
distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
@@ -329,7 +309,7 @@ restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
@@ -368,9 +348,9 @@ Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
@@ -411,7 +391,7 @@ excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
versions of the Library General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
@@ -422,7 +402,7 @@ conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
@@ -432,7 +412,7 @@ decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
@@ -455,9 +435,8 @@ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
END OF TERMS AND CONDITIONS
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
@@ -476,7 +455,7 @@ convey the exclusion of warranty; and each file should have at least the
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@@ -485,8 +464,7 @@ convey the exclusion of warranty; and each file should have at least the
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
||||
USA
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
@@ -495,8 +473,7 @@ school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random
|
||||
Hacker.
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
+8
-4
@@ -4,7 +4,10 @@ The FreeCAD application does not collect, transmit, share or use any Personal Da
|
||||
|
||||
FreeCAD is community-developed Free Software. The community does not condone the unauthorized usage of private data, so our software does not gather or send personal data.
|
||||
|
||||
The FreeCAD website is mostly static, it does not contain any trackers, neither ours nor third-party. The website uses cookies to remember logged in status, timezone and other data related to navigating the site. The website does not contain advertisements.
|
||||
The FreeCAD website is mostly static, it does not contain any trackers, neither ours nor third-party. The website uses cookies to remember logged in status, timezone and other
|
||||
data related to navigating the site.
|
||||
|
||||
The website does not contain advertisements.
|
||||
|
||||
The software does not contain advertisements or trackers either.
|
||||
|
||||
@@ -12,9 +15,9 @@ The software does not contain advertisements or trackers either.
|
||||
|
||||
FreeCAD is able to load or save files to/from remote servers (for some protocols and platforms). If you choose to load or save a remote file, your IP or other private data might be shared as part of the normal connection flow for the given protocol. This is out of our control and it is up to you to decide whether you trust a remote host.
|
||||
|
||||
The FreeCAD eco system includes user developed workbenches. These workbenches can be installed/updated using the Add-on Manager. The Add-on Manager retrieves workbenches from remote servers across the internet. Add-on workbenches are not checked for malicious content. It is your responsibility to decide whether you trust an add-on workbench.
|
||||
The FreeCAD eco system includes user developed workbenches. These workbenches can be installed/updated using the Add-on Manager. The Add-on Manager retrieves workbenches from remote servers across the internet. Add-on workbenches are not checked for malicious content. It is your responsibility to decide whether you trust an add-on workbench.
|
||||
|
||||
FreeCAD is meant to manipulate CAD files which may contain metadata. It is your responsibility to verify the metadata contained in your files before you share them with others. These files may contain local directory paths which could reveal user names if the user name forms part of the path - as in “C:\MrsCAD\Documents\myFreeCADFile.FCstd”.
|
||||
FreeCAD is meant to manipulate CAD files which may contain metadata. It is your responsibility to verify the metadata contained in your files before you share them with others. These files may contain local directory paths which could reveal user names if the user name forms part of the path - as in “C:\MrsCAD\Documents\myFreeCADFile.FCstd”.
|
||||
|
||||
FreeCAD can also be used to create and run macros. These are Python scripts that can perform any action that the user can perform on a system. When running a macro from an outside source, it is your responsibility to ensure you trust the author.
|
||||
|
||||
@@ -25,4 +28,5 @@ When reading the online version of the User Manual within FreeCAD, manual conten
|
||||
FreeCAD is Free Software and therefore may be packaged by other people, who may include additional software or modify the source code. We do not vouch for these third-party packages and cannot tell you what they contain and what they do regarding your privacy. The official packages are explicitly listed in our download page.
|
||||
|
||||
|
||||
*The above privacy policy is based on the [GIMP privacy policy](https://www.gimp.org/about/privacy.html).*
|
||||
- [based on the GIMP privacy policy](https://www.gimp.org/about/privacy.html)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<a href="https://freecad.org"><img src="/src/Gui/Icons/freecad.svg" height="100px" width="100px"></a>
|
||||
|
||||
### Your own 3D Parametric Modeler
|
||||
### Your own 3D parametric modeler
|
||||
|
||||
[Website](https://www.freecad.org) •
|
||||
[Documentation](https://wiki.freecad.org) •
|
||||
@@ -10,7 +10,7 @@
|
||||
[Blog](https://blog.freecad.org)
|
||||
|
||||
|
||||
[](https://github.com/freecad/freecad/releases/latest) [](https://crowdin.com/project/freecad)
|
||||
[](https://github.com/freecad/freecad/releases/latest) [](https://crowdin.com/project/freecad) [](https://liberapay.com/FreeCAD)
|
||||
|
||||
<img src="/.github/images/partdesign.png" width="800"/>
|
||||
|
||||
@@ -22,8 +22,8 @@ modeler made primarily to design real-life objects of any size.
|
||||
Parametric modeling allows you to easily modify your design by going back into
|
||||
your model history to change its parameters.
|
||||
|
||||
* **Create 3D from 2D and back** FreeCAD lets you sketch geometry-constrained
|
||||
2D shapes and use them as a base to build other objects.
|
||||
* **Create 3D from 2D and back** FreeCAD lets you to sketch geometry constrained
|
||||
2D shapes and use them as a base to build other objects.
|
||||
It contains many components to adjust dimensions or extract design details from
|
||||
3D models to create high quality production-ready drawings.
|
||||
|
||||
@@ -44,25 +44,32 @@ Installing
|
||||
----------
|
||||
|
||||
Precompiled packages for stable releases are available for Windows, macOS and Linux on the
|
||||
[latest releases page](https://github.com/FreeCAD/FreeCAD/releases/latest).
|
||||
[Releases page](https://github.com/FreeCAD/FreeCAD/releases).
|
||||
|
||||
On most Linux distributions, FreeCAD is also directly installable from the
|
||||
software center application.
|
||||
|
||||
For weekly development releases visit the [releases page](https://github.com/FreeCAD/FreeCAD/releases/).
|
||||
For development releases check the [weekly-builds page](https://github.com/FreeCAD/FreeCAD-Bundle/releases/tag/weekly-builds).
|
||||
|
||||
Other options are described on the [wiki Download page](https://wiki.freecad.org/Download).
|
||||
Other options are described at the [wiki Download page](https://wiki.freecad.org/Download).
|
||||
|
||||
Compiling
|
||||
---------
|
||||
|
||||
FreeCAD requires several dependencies to correctly compile for development and
|
||||
production builds. The following pages contain updated build instructions for
|
||||
their respective platforms:
|
||||
Compiling FreeCAD requires installation of several libraries and their
|
||||
development files such as OCCT (Open Cascade), Coin and Qt, listed in the
|
||||
pages below. Once this is done, FreeCAD can be compiled with
|
||||
CMake. On Windows, these libraries are bundled and offered by the
|
||||
FreeCAD team in a convenient package. On Linux, they are usually found
|
||||
in your distribution's repositories, and on macOS and other platforms,
|
||||
you will usually have to compile them yourself.
|
||||
|
||||
The pages below contain up-to-date build instructions:
|
||||
|
||||
- [Linux](https://wiki.freecad.org/Compile_on_Linux)
|
||||
- [Windows](https://wiki.freecad.org/Compile_on_Windows)
|
||||
- [macOS](https://wiki.freecad.org/Compile_on_MacOS)
|
||||
- [Cygwin](https://wiki.freecad.org/Compile_on_Cygwin)
|
||||
- [MinGW](https://wiki.freecad.org/Compile_on_MinGW)
|
||||
|
||||
|
||||
@@ -71,46 +78,45 @@ Reporting Issues
|
||||
|
||||
To report an issue please:
|
||||
|
||||
- Consider posting to the [Forum](https://forum.freecad.org), [Discord](https://discord.com/invite/w2cTKGzccC) channel, or [Reddit](https://www.reddit.com/r/FreeCAD) to verify the issue;
|
||||
- Consider posting to the [Forum](https://forum.freecad.org), [Discord](https://discord.com/invite/F4hdxzYZfc) channel, or [Reddit](https://www.reddit.com/r/FreeCAD) to verify the issue;
|
||||
- Search the existing [issues](https://github.com/FreeCAD/FreeCAD/issues) for potential duplicates;
|
||||
- Use the most updated stable or [development versions](https://github.com/FreeCAD/FreeCAD/releases/) of FreeCAD;
|
||||
- Post version info from `Help > About FreeCAD > Copy to clipboard`;
|
||||
- Restart FreeCAD in safe mode `Help > Restart in safe mode` and try to reproduce the issue again. If the issue is resolved it can be fixed by deleting the FreeCAD config files.
|
||||
- Use the most updated stable or [development versions](https://github.com/FreeCAD/FreeCAD-Bundle/releases/tag/weekly-builds) of FreeCAD;
|
||||
- Post version info from e.g. `Help > About FreeCAD > Copy to clipboard`;
|
||||
- Start recording a macro `Macro > Macro recording...` and repeat all steps. Stop recording after the issue occurs and upload the saved macro or copy the macro code in the issue;
|
||||
- Post a Step-By-Step explanation on how to recreate the issue;
|
||||
- Upload an example file (FCStd as ZIP file) to demonstrate the problem;
|
||||
|
||||
For more details see:
|
||||
For more detail see:
|
||||
|
||||
- [Bug Tracker](https://github.com/FreeCAD/FreeCAD/issues)
|
||||
- [Reporting Issues and Requesting Features](https://github.com/FreeCAD/FreeCAD/issues/new/choose)
|
||||
- [Contributing](https://github.com/FreeCAD/FreeCAD/blob/main/CONTRIBUTING.md)
|
||||
- [Help Forum](https://forum.freecad.org/viewforum.php?f=3)
|
||||
- [Developers Handbook](https://freecad.github.io/DevelopersHandbook/)
|
||||
|
||||
> [!NOTE]
|
||||
The [FPA](https://fpa.freecad.org) offers developers the opportunity
|
||||
to apply for a grant to work on projects of their choosing. Check
|
||||
[jobs and funding](https://blog.freecad.org/jobs/) to know more.
|
||||
|
||||
|
||||
Usage & Getting Help
|
||||
Usage & Getting help
|
||||
--------------------
|
||||
|
||||
The FreeCAD wiki contains documentation on
|
||||
general FreeCAD usage, Python scripting, and development.
|
||||
View these pages for more information:
|
||||
general FreeCAD usage, Python scripting, and development. These
|
||||
pages might help you get started:
|
||||
|
||||
- [Getting started](https://wiki.freecad.org/Getting_started)
|
||||
- [Features list](https://wiki.freecad.org/Feature_list)
|
||||
- [Frequent questions](https://wiki.freecad.org/FAQ/en)
|
||||
- [Workbenches](https://wiki.freecad.org/Workbenches)
|
||||
- [Scripting](https://wiki.freecad.org/Power_users_hub)
|
||||
- [Developers Handbook](https://freecad.github.io/DevelopersHandbook/)
|
||||
- [Development](https://wiki.freecad.org/Developer_hub)
|
||||
|
||||
The [FreeCAD forum](https://forum.freecad.org) is a great place
|
||||
to find help and solve specific problems when learning to use FreeCAD.
|
||||
The [FreeCAD forum](https://forum.freecad.org) is also a great place
|
||||
to find help and solve specific problems you might encounter when
|
||||
learning to use FreeCAD.
|
||||
|
||||
---
|
||||
|
||||
<p>This project receives generous infrastructure support from
|
||||
<a href="https://www.digitalocean.com/">
|
||||
|
||||
+9
-9
@@ -1,29 +1,29 @@
|
||||
# Security Policy
|
||||
|
||||
The FreeCAD project is a FOSS (Free and Open-Source Software) project that has a community of thousands of users and
|
||||
The FreeCAD project is a FOSS (Free and Open-Source Software) project that has a community of thousands of users and
|
||||
hundreds of developers worldwide. We encourage responsible reporting of security vulnerabilities that may affect users
|
||||
of this software, and will endeavor to address these vulnerabilities when they are discovered.
|
||||
|
||||
## Bounties
|
||||
|
||||
FreeCAD does not have a program to pay bounties for security bugs. If you discover a vulnerability that affects a part
|
||||
of the FreeCAD project (either directly in FreeCAD, in a library it depends on, or in any of the various other
|
||||
FreeCAD does not have a program to pay bounties for security bugs. If you discover a vulnerability that affects a part
|
||||
of the FreeCAD project (either directly in FreeCAD, in a library it depends on, or in any of the various other
|
||||
subprojects such as our website, forums, etc.) we ask you to join the large community of volunteer contributors and
|
||||
file a report about the issue.
|
||||
|
||||
Note that funds may be available from the [FreeCAD Project Association (FPA)](https://fpa.freecad.org) to pursue
|
||||
security research and/or the development of fixes to any vulnerabilities discovered. However, vulnerabilities held as
|
||||
Note that funds may be available from the [FreeCAD Project Association (FPA)](https://fpa.freecad.org) to pursue
|
||||
security research and/or the development of fixes to any vulnerabilities discovered. However, vulnerabilities held as
|
||||
hostage in demands for "bounties" will not be entertained. Contact the FPA at fpa@freecad.org for more information.
|
||||
|
||||
## Supported Versions
|
||||
|
||||
FreeCAD implements security fixes to the current release series, and to the current development on the main branch.
|
||||
FreeCAD implements security fixes to the current release series, and to the current development on the master branch.
|
||||
|
||||
| Version | Supported |
|
||||
|---------| ------------------ |
|
||||
| 1.1dev | :white_check_mark: |
|
||||
| 1.0 | :white_check_mark: |
|
||||
| < 1.0 | :x: |
|
||||
| 0.22dev | :white_check_mark: |
|
||||
| 0.21 | :white_check_mark: |
|
||||
| < 0.21 | :x: |
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
|
||||
+12
-23
@@ -1,8 +1,8 @@
|
||||
# - Try to find Eigen3 lib
|
||||
#
|
||||
# This module supports requiring a minimum version, e.g. you can do
|
||||
# find_package(Eigen3 3.4.0)
|
||||
# to require version 3.4.0 or newer of Eigen3.
|
||||
# find_package(Eigen3 3.1.2)
|
||||
# to require version 3.1.2 or newer of Eigen3.
|
||||
#
|
||||
# Once done this will define
|
||||
#
|
||||
@@ -17,33 +17,22 @@
|
||||
|
||||
if(NOT Eigen3_FIND_VERSION)
|
||||
set(Eigen3_FIND_VERSION_MAJOR 3)
|
||||
set(Eigen3_FIND_VERSION_MINOR 4)
|
||||
set(Eigen3_FIND_VERSION_MINOR 0)
|
||||
set(Eigen3_FIND_VERSION_PATCH 0)
|
||||
set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}")
|
||||
endif(NOT Eigen3_FIND_VERSION)
|
||||
|
||||
macro(_eigen3_check_version)
|
||||
# file Version exists from Eigen3 5.0.0
|
||||
if (EXISTS "${EIGEN3_INCLUDE_DIR}/Eigen/Version")
|
||||
file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/Version" _eigen3_version_header)
|
||||
string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}")
|
||||
set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}")
|
||||
set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "define[ \t]+EIGEN_PATCH_VERSION[ \t]+([0-9]+)" _eigen3_patch_version_match "${_eigen3_version_header}")
|
||||
set(EIGEN3_PATCH_VERSION "${CMAKE_MATCH_1}")
|
||||
set(EIGEN3_VERSION ${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION}.${EIGEN3_PATCH_VERSION})
|
||||
else()
|
||||
file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header)
|
||||
string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}")
|
||||
set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}")
|
||||
set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}")
|
||||
set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}")
|
||||
set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION})
|
||||
endif()
|
||||
file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header)
|
||||
|
||||
string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}")
|
||||
set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}")
|
||||
set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}")
|
||||
set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}")
|
||||
|
||||
set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION})
|
||||
if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
|
||||
set(EIGEN3_VERSION_OK FALSE)
|
||||
message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, "
|
||||
|
||||
+7
-4
@@ -9,10 +9,10 @@
|
||||
IF ( CMAKE_PKGCONFIG_EXECUTABLE )
|
||||
|
||||
MESSAGE( STATUS "Detecting KDL" )
|
||||
|
||||
|
||||
SET(ENV{PKG_CONFIG_PATH} "${KDL_INSTALL}/lib/pkgconfig/")
|
||||
MESSAGE( "Looking for KDL in: ${KDL_INSTALL}")
|
||||
PKGCONFIG( "orocos-kdl >= 1.4.0" KDL_FOUND KDL_INCLUDE_DIRS KDL_DEFINES KDL_LINK_DIRS KDL_LIBS )
|
||||
PKGCONFIG( "orocos-kdl >= 0.99" KDL_FOUND KDL_INCLUDE_DIRS KDL_DEFINES KDL_LINK_DIRS KDL_LIBS )
|
||||
|
||||
IF( KDL_FOUND )
|
||||
MESSAGE(" Includes in: ${KDL_INCLUDE_DIRS}")
|
||||
@@ -22,10 +22,13 @@ IF ( CMAKE_PKGCONFIG_EXECUTABLE )
|
||||
|
||||
INCLUDE_DIRECTORIES( ${KDL_INCLUDE_DIRS} )
|
||||
LINK_DIRECTORIES( ${KDL_LINK_DIRS})
|
||||
#OROCOS_PKGCONFIG_INCPATH("${KDLTK_INCLUDE_DIRS}")
|
||||
#OROCOS_PKGCONFIG_LIBS("${KDL_LIBS}")
|
||||
#OROCOS_PKGCONFIG_LIBPATH("${KDL_LINK_DIRS}")
|
||||
|
||||
SET(ENV{PKG_CONFIG_PATH} "${KDL_INSTALL}/lib/pkgconfig/:${OROCOS_INSTALL}/lib/pkgconfig")
|
||||
MESSAGE( "Looking for KDL Toolkit in: ${PKG_CONFIG_PATH}")
|
||||
PKGCONFIG( "orocos-kdltk-${OROCOS_TARGET} >= 1.4.0" KDLTK_FOUND KDLTK_INCLUDE_DIRS KDLTK_DEFINES KDLTK_LINK_DIRS KDLTK_LIBS )
|
||||
PKGCONFIG( "orocos-kdltk-${OROCOS_TARGET} >= 0.99" KDLTK_FOUND KDLTK_INCLUDE_DIRS KDLTK_DEFINES KDLTK_LINK_DIRS KDLTK_LIBS )
|
||||
IF(KDLTK_FOUND)
|
||||
INCLUDE_DIRECTORIES( ${KDLTK_INCLUDE_DIRS} )
|
||||
LINK_DIRECTORIES( ${KDLTK_LINK_DIRS})
|
||||
@@ -35,7 +38,7 @@ IF ( CMAKE_PKGCONFIG_EXECUTABLE )
|
||||
IF(CORBA_ENABLED)
|
||||
SET(ENV{PKG_CONFIG_PATH} "${KDL_INSTALL}/lib/pkgconfig/:${OROCOS_INSTALL}/lib/pkgconfig")
|
||||
MESSAGE("Looking for KDL Toolkit CORBA extension in ${PKG_CONFIG_PATH}")
|
||||
PKGCONFIG( "orocos-kdltk-corba-${OROCOS_TARGET} >= 1.4.0" KDLTKCORBA_FOUND KDLTKCORBA_INCLUDE_DIRS KDLTKCORBA_DEFINES KDLTKCORBA_LINK_DIRS KDLTKCORBA_LIBS )
|
||||
PKGCONFIG( "orocos-kdltk-corba-${OROCOS_TARGET} >= 0.99" KDLTKCORBA_FOUND KDLTKCORBA_INCLUDE_DIRS KDLTKCORBA_DEFINES KDLTKCORBA_LINK_DIRS KDLTKCORBA_LIBS )
|
||||
IF(KDLTKCORBA_FOUND)
|
||||
INCLUDE_DIRECTORIES( ${KDLTKCORBA_INCLUDE_DIRS} )
|
||||
LINK_DIRECTORIES( ${KDLTKCORBA_LINK_DIRS})
|
||||
|
||||
@@ -13,7 +13,7 @@ IF(Python3_Interpreter_FOUND)
|
||||
# Try to import matplotlib into Python interpreter. Python
|
||||
# interpreter was found previously as required package, so
|
||||
# don't take care about this.
|
||||
execute_process(COMMAND "${Python3_EXECUTABLE}" "-c"
|
||||
execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c"
|
||||
"import matplotlib as m; print(m.__version__); print(m.__path__[0]);"
|
||||
RESULT_VARIABLE _MATPLOTLIB_SEARCH_SUCCESS
|
||||
OUTPUT_VARIABLE _MATPLOTLIB_VALUES
|
||||
|
||||
+149
-116
@@ -1,4 +1,4 @@
|
||||
# Try to find OCC
|
||||
# Try to find OCE / OCC
|
||||
# Once done this will define
|
||||
#
|
||||
# OCC_FOUND - system has OCC - OpenCASCADE
|
||||
@@ -7,134 +7,167 @@
|
||||
# OCC_LIBRARIES - Link this to use OCC
|
||||
# OCC_OCAF_LIBRARIES - Link this to use OCC OCAF framework
|
||||
|
||||
# we first try to find opencascade directly:
|
||||
if (NOT OCCT_CMAKE_FALLBACK)
|
||||
# First try to find OpenCASCADE Community Edition
|
||||
if(NOT DEFINED OCE_DIR)
|
||||
# Check for OSX needs to come first because UNIX evaluates to true on OSX
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
if(DEFINED MACPORTS_PREFIX)
|
||||
find_package(OCE QUIET HINTS ${MACPORTS_PREFIX}/Library/Frameworks)
|
||||
elseif(DEFINED HOMEBREW_PREFIX)
|
||||
find_package(OCE QUIET HINTS ${HOMEBREW_PREFIX}/Cellar/oce/*)
|
||||
endif()
|
||||
elseif(UNIX)
|
||||
set(OCE_DIR "/usr/local/share/cmake/")
|
||||
elseif(WIN32)
|
||||
set(OCE_DIR "c:/OCE-0.4.0/share/cmake")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(${FREECAD_USE_OCC_VARIANT} MATCHES "Community Edition")
|
||||
find_package(OCE QUIET)
|
||||
endif()
|
||||
|
||||
if(OCE_FOUND)
|
||||
message(STATUS "-- OpenCASCADE Community Edition has been found.")
|
||||
# Disable this define. For more details see bug #0001872
|
||||
#add_definitions (-DHAVE_CONFIG_H)
|
||||
set(OCC_INCLUDE_DIR ${OCE_INCLUDE_DIRS})
|
||||
#set(OCC_LIBRARY_DIR ${OCE_LIBRARY_DIR})
|
||||
else(OCE_FOUND) #look for OpenCASCADE
|
||||
# we first try to find opencascade directly:
|
||||
if(NOT OCCT_CMAKE_FALLBACK)
|
||||
find_package(OpenCASCADE CONFIG QUIET)
|
||||
get_property(flags DIRECTORY PROPERTY COMPILE_DEFINITIONS)
|
||||
# OCCT 7.5 adds this define that causes hundreds of compiler warnings with Qt5.x, so remove it again
|
||||
list(FILTER flags EXCLUDE REGEX [[GL_GLEXT_LEGACY]])
|
||||
set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS ${flags})
|
||||
endif ()
|
||||
if (OpenCASCADE_FOUND)
|
||||
if(NOT (CMAKE_VERSION VERSION_LESS 3.6.0))
|
||||
get_property(flags DIRECTORY PROPERTY COMPILE_DEFINITIONS)
|
||||
# OCCT 7.5 adds this define that causes hundreds of compiler warnings with Qt5.x, so remove it again
|
||||
list(FILTER flags EXCLUDE REGEX [[GL_GLEXT_LEGACY]])
|
||||
set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS ${flags})
|
||||
endif()
|
||||
endif(NOT OCCT_CMAKE_FALLBACK)
|
||||
if(OpenCASCADE_FOUND)
|
||||
set(OCC_FOUND ${OpenCASCADE_FOUND})
|
||||
set(OCC_INCLUDE_DIR ${OpenCASCADE_INCLUDE_DIR})
|
||||
set(OCC_LIBRARY_DIR ${OpenCASCADE_LIBRARY_DIR})
|
||||
set(OCC_LIBRARIES ${OpenCASCADE_LIBRARIES})
|
||||
set(OCC_OCAF_LIBRARIES TKCAF TKXCAF)
|
||||
else ()
|
||||
if (WIN32)
|
||||
if (CYGWIN OR MINGW)
|
||||
find_path(OCC_INCLUDE_DIR Standard_Version.hxx
|
||||
/usr/include/opencascade
|
||||
/usr/local/include/opencascade
|
||||
/opt/opencascade/include
|
||||
/opt/opencascade/inc
|
||||
)
|
||||
find_path(OCC_LIBRARY TKernel
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/opencascade/lib
|
||||
)
|
||||
else ()
|
||||
find_path(OCC_INCLUDE_DIR Standard_Version.hxx
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\OCC\\2;Installation Path]/include"
|
||||
)
|
||||
find_library(OCC_LIBRARY TKernel
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\OCC\\2;Installation Path]/lib"
|
||||
)
|
||||
endif ()
|
||||
else ()
|
||||
find_path(OCC_INCLUDE_DIR Standard_Version.hxx
|
||||
/usr/include/occt
|
||||
/usr/include/opencascade
|
||||
/usr/local/include/opencascade
|
||||
/opt/opencascade/include
|
||||
/opt/opencascade/inc
|
||||
else(OpenCASCADE_FOUND)
|
||||
if(WIN32)
|
||||
if(CYGWIN OR MINGW)
|
||||
FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
|
||||
/usr/include/opencascade
|
||||
/usr/local/include/opencascade
|
||||
/opt/opencascade/include
|
||||
/opt/opencascade/inc
|
||||
)
|
||||
find_library(OCC_LIBRARY TKernel
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/opencascade/lib
|
||||
FIND_LIBRARY(OCC_LIBRARY TKernel
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/opencascade/lib
|
||||
)
|
||||
endif ()
|
||||
if (OCC_LIBRARY)
|
||||
get_filename_component(OCC_LIBRARY_DIR ${OCC_LIBRARY} PATH)
|
||||
if (NOT OCC_INCLUDE_DIR)
|
||||
find_path(OCC_INCLUDE_DIR Standard_Version.hxx
|
||||
${OCC_LIBRARY_DIR}/../inc
|
||||
)
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
else(CYGWIN OR MINGW)
|
||||
FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\OCC\\2;Installation Path]/include"
|
||||
)
|
||||
FIND_LIBRARY(OCC_LIBRARY TKernel
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\OCC\\2;Installation Path]/lib"
|
||||
)
|
||||
endif(CYGWIN OR MINGW)
|
||||
else(WIN32)
|
||||
FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
|
||||
/usr/include/occt
|
||||
/usr/include/opencascade
|
||||
/usr/local/include/opencascade
|
||||
/opt/opencascade/include
|
||||
/opt/opencascade/inc
|
||||
)
|
||||
FIND_LIBRARY(OCC_LIBRARY TKernel
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/opencascade/lib
|
||||
)
|
||||
endif(WIN32)
|
||||
if(OCC_LIBRARY)
|
||||
GET_FILENAME_COMPONENT(OCC_LIBRARY_DIR ${OCC_LIBRARY} PATH)
|
||||
IF(NOT OCC_INCLUDE_DIR)
|
||||
FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
|
||||
${OCC_LIBRARY_DIR}/../inc
|
||||
)
|
||||
ENDIF()
|
||||
endif(OCC_LIBRARY)
|
||||
endif(OpenCASCADE_FOUND)
|
||||
endif(OCE_FOUND)
|
||||
|
||||
if (OCC_INCLUDE_DIR)
|
||||
file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MAJOR
|
||||
REGEX "#define OCC_VERSION_MAJOR.*"
|
||||
)
|
||||
string(REGEX MATCH "[0-9]+" OCC_MAJOR ${OCC_MAJOR})
|
||||
file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MINOR
|
||||
REGEX "#define OCC_VERSION_MINOR.*"
|
||||
)
|
||||
string(REGEX MATCH "[0-9]+" OCC_MINOR ${OCC_MINOR})
|
||||
file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MAINT
|
||||
REGEX "#define OCC_VERSION_MAINTENANCE.*"
|
||||
)
|
||||
string(REGEX MATCH "[0-9]+" OCC_MAINT ${OCC_MAINT})
|
||||
if(OCC_INCLUDE_DIR)
|
||||
file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MAJOR
|
||||
REGEX "#define OCC_VERSION_MAJOR.*"
|
||||
)
|
||||
string(REGEX MATCH "[0-9]+" OCC_MAJOR ${OCC_MAJOR})
|
||||
file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MINOR
|
||||
REGEX "#define OCC_VERSION_MINOR.*"
|
||||
)
|
||||
string(REGEX MATCH "[0-9]+" OCC_MINOR ${OCC_MINOR})
|
||||
file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MAINT
|
||||
REGEX "#define OCC_VERSION_MAINTENANCE.*"
|
||||
)
|
||||
string(REGEX MATCH "[0-9]+" OCC_MAINT ${OCC_MAINT})
|
||||
|
||||
set(OCC_VERSION_STRING "${OCC_MAJOR}.${OCC_MINOR}.${OCC_MAINT}")
|
||||
endif ()
|
||||
set(OCC_VERSION_STRING "${OCC_MAJOR}.${OCC_MINOR}.${OCC_MAINT}")
|
||||
endif(OCC_INCLUDE_DIR)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set OCC_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(OCC REQUIRED_VARS OCC_INCLUDE_DIR VERSION_VAR OCC_VERSION_STRING)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OCC REQUIRED_VARS OCC_INCLUDE_DIR VERSION_VAR OCC_VERSION_STRING)
|
||||
|
||||
if (OCC_FOUND)
|
||||
set(OCC_LIBRARIES
|
||||
TKFillet
|
||||
TKMesh
|
||||
TKernel
|
||||
TKG2d
|
||||
TKG3d
|
||||
TKMath
|
||||
TKShHealing
|
||||
TKXSBase
|
||||
TKBool
|
||||
TKBO
|
||||
TKBRep
|
||||
TKTopAlgo
|
||||
TKGeomAlgo
|
||||
TKGeomBase
|
||||
TKOffset
|
||||
TKPrim
|
||||
TKHLR
|
||||
TKFeat
|
||||
)
|
||||
if (OCC_VERSION_STRING VERSION_GREATER_EQUAL 7.9.0)
|
||||
list(APPEND OCC_LIBRARIES TKExpress)
|
||||
endif ()
|
||||
if(OCC_FOUND)
|
||||
set(OCC_LIBRARIES
|
||||
TKFillet
|
||||
TKMesh
|
||||
TKernel
|
||||
TKG2d
|
||||
TKG3d
|
||||
TKMath
|
||||
TKShHealing
|
||||
TKXSBase
|
||||
TKBool
|
||||
TKBO
|
||||
TKBRep
|
||||
TKTopAlgo
|
||||
TKGeomAlgo
|
||||
TKGeomBase
|
||||
TKOffset
|
||||
TKPrim
|
||||
TKHLR
|
||||
TKFeat
|
||||
)
|
||||
if (OCC_VERSION_STRING VERSION_GREATER_EQUAL 7.9.0)
|
||||
list(APPEND OCC_LIBRARIES TKExpress)
|
||||
endif ()
|
||||
set(OCC_OCAF_LIBRARIES
|
||||
TKBin
|
||||
TKBinL
|
||||
TKCAF
|
||||
TKXCAF
|
||||
TKLCAF
|
||||
TKVCAF
|
||||
TKCDF
|
||||
TKMeshVS
|
||||
TKService
|
||||
TKV3d
|
||||
)
|
||||
|
||||
set(OCC_OCAF_LIBRARIES
|
||||
TKBin
|
||||
TKBinL
|
||||
TKCAF
|
||||
TKXCAF
|
||||
TKLCAF
|
||||
TKVCAF
|
||||
TKCDF
|
||||
TKMeshVS
|
||||
TKService
|
||||
TKV3d
|
||||
TKRWMesh
|
||||
)
|
||||
|
||||
if (OCC_VERSION_STRING VERSION_LESS 7.8.0)
|
||||
list(APPEND OCC_LIBRARIES TKIGES TKSTL TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP)
|
||||
list(APPEND OCC_OCAF_LIBRARIES TKXDESTEP TKXDEIGES)
|
||||
else ()
|
||||
list(APPEND OCC_LIBRARIES TKDESTEP TKDEIGES TKDEGLTF TKDESTL)
|
||||
endif ()
|
||||
message(STATUS "Found OpenCASCADE version: ${OCC_VERSION_STRING}")
|
||||
message(STATUS " OpenCASCADE include directory: ${OCC_INCLUDE_DIR}")
|
||||
message(STATUS " OpenCASCADE shared libraries directory: ${OCC_LIBRARY_DIR}")
|
||||
endif ()
|
||||
if(NOT OCC_VERSION_STRING VERSION_LESS 7.5.0)
|
||||
list(APPEND OCC_OCAF_LIBRARIES TKRWMesh)
|
||||
endif(NOT OCC_VERSION_STRING VERSION_LESS 7.5.0)
|
||||
if(OCC_VERSION_STRING VERSION_LESS 7.8.0)
|
||||
list(APPEND OCC_LIBRARIES TKIGES TKSTL TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP)
|
||||
list(APPEND OCC_OCAF_LIBRARIES TKXDESTEP TKXDEIGES)
|
||||
else(OCC_VERSION_STRING VERSION_LESS 7.8.0)
|
||||
list(APPEND OCC_LIBRARIES TKDESTEP TKDEIGES TKDEGLTF TKDESTL)
|
||||
endif(OCC_VERSION_STRING VERSION_LESS 7.8.0)
|
||||
message(STATUS "-- Found OCE/OpenCASCADE version: ${OCC_VERSION_STRING}")
|
||||
message(STATUS "-- OCE/OpenCASCADE include directory: ${OCC_INCLUDE_DIR}")
|
||||
message(STATUS "-- OCE/OpenCASCADE shared libraries directory: ${OCC_LIBRARY_DIR}")
|
||||
else(OCC_FOUND)
|
||||
#message(SEND_ERROR "Neither OpenCASCADE Community Edition nor OpenCasCade were found: will not build CAD modules!")
|
||||
endif(OCC_FOUND)
|
||||
|
||||
@@ -118,7 +118,7 @@ if(PYCXX_FOUND)
|
||||
${PYCXX_SOURCE_DIR}/IndirectPythonInterface.cxx
|
||||
)
|
||||
|
||||
#set old 6.2 pycxx compatibility
|
||||
#set old 6.2 pycxx compatibility
|
||||
list(APPEND PYCXX_SOURCES ${PYCXX_SOURCE_DIR}/cxx_exceptions.cxx)
|
||||
add_definitions(-DPYCXX_6_2_COMPATIBILITY)
|
||||
#end old compatibility
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
if(WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
#pyside2 tools are often in same location as python interpreter
|
||||
get_filename_component(PYTHON_BIN_DIR ${Python3_EXECUTABLE} PATH)
|
||||
get_filename_component(PYTHON_BIN_DIR ${PYTHON_EXECUTABLE} PATH)
|
||||
set(PYSIDE_BIN_DIR ${PYTHON_BIN_DIR})
|
||||
endif(WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
|
||||
@@ -16,8 +16,8 @@ FIND_PACKAGE(Qt5 COMPONENTS Core Widgets)
|
||||
|
||||
IF(Qt5Core_VERSION VERSION_LESS 5.14)
|
||||
# Legacy (< 5.14)
|
||||
FIND_PROGRAM(PYSIDE2_UIC_EXECUTABLE NAMES python2-pyside2-uic pyside2-uic pyside2-uic-${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} pyuic5 HINTS ${PYSIDE_BIN_DIR})
|
||||
FIND_PROGRAM(PYSIDE2_RCC_EXECUTABLE NAMES pyside2-rcc pyside2-rcc-${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} pyrcc5 HINTS ${PYSIDE_BIN_DIR})
|
||||
FIND_PROGRAM(PYSIDE2_UIC_EXECUTABLE NAMES python2-pyside2-uic pyside2-uic pyside2-uic-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} pyuic5 HINTS ${PYSIDE_BIN_DIR})
|
||||
FIND_PROGRAM(PYSIDE2_RCC_EXECUTABLE NAMES pyside2-rcc pyside2-rcc-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} pyrcc5 HINTS ${PYSIDE_BIN_DIR})
|
||||
set(UICOPTIONS "")
|
||||
set(RCCOPTIONS "")
|
||||
ELSE()
|
||||
|
||||
+12
-12
@@ -4,19 +4,19 @@
|
||||
# cMake find_package() call
|
||||
|
||||
find_package(PySide6 CONFIG QUIET)
|
||||
|
||||
if(NOT PySide6_FOUND)
|
||||
find_pip_package(PySide6)
|
||||
endif()
|
||||
if(NOT PySide6_INCLUDE_DIR AND TARGET PySide6::pyside6)
|
||||
get_property(PySide6_INCLUDE_DIR TARGET PySide6::pyside6 PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
|
||||
endif()
|
||||
|
||||
if(NOT PySide6_INCLUDE_DIRS AND TARGET PySide6::pyside6)
|
||||
get_property(PySide6_INCLUDE_DIRS TARGET PySide6::pyside6 PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
|
||||
endif()
|
||||
if(NOT PySide6_INCLUDE_DIR)
|
||||
find_pip_package(PySide6)
|
||||
if (PySide6_FOUND)
|
||||
set(PYSIDE_INCLUDE_DIR ${PySide6_INCLUDE_DIRS} CACHE INTERNAL "")
|
||||
set(PYSIDE_LIBRARY ${PySide6_LIBRARIES} CACHE INTERNAL "")
|
||||
set(PYSIDE_FOUND TRUE CACHE BOOL OFF)
|
||||
set(PYSIDE_MAJOR_VERSION 6 CACHE INTERNAL 6)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Also provide the old-style variables so we don't have to update everything yet
|
||||
if (PySide6_FOUND)
|
||||
set(PYSIDE_INCLUDE_DIR ${PySide6_INCLUDE_DIRS})
|
||||
set(PYSIDE_LIBRARY ${PySide6_LIBRARIES})
|
||||
set(PYSIDE_FOUND TRUE)
|
||||
set(PYSIDE_MAJOR_VERSION 6)
|
||||
endif()
|
||||
|
||||
@@ -11,18 +11,18 @@ if(NOT Shiboken6_FOUND)
|
||||
if(NOT Shiboken6_INCLUDE_DIR)
|
||||
find_pip_package(Shiboken6)
|
||||
if (Shiboken6_FOUND)
|
||||
set(SHIBOKEN_LIBRARY ${Shiboken6_LIBRARIES})
|
||||
set(SHIBOKEN_MAJOR_VERSION 6)
|
||||
set(SHIBOKEN_FOUND ON)
|
||||
set(SHIBOKEN_LIBRARY ${Shiboken6_LIBRARIES} CACHE INTERNAL "")
|
||||
set(SHIBOKEN_MAJOR_VERSION 6 CACHE INTERNAL 6)
|
||||
set(SHIBOKEN_FOUND ON CACHE BOOL OFF)
|
||||
endif()
|
||||
# The include directory we actually want is part of shiboken6-generator
|
||||
find_pip_package(shiboken6_generator)
|
||||
if (shiboken6_generator_FOUND)
|
||||
set(SHIBOKEN_INCLUDE_DIR ${shiboken6_generator_INCLUDE_DIRS})
|
||||
set(SHIBOKEN_INCLUDE_DIR ${shiboken6_generator_INCLUDE_DIRS} CACHE PATH "")
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
set(SHIBOKEN_INCLUDE_DIR ${Shiboken6_INCLUDE_DIRS})
|
||||
set(SHIBOKEN_LIBRARY ${Shiboken6_LIBRARIES})
|
||||
set(SHIBOKEN_FOUND ON)
|
||||
set(SHIBOKEN_INCLUDE_DIR ${Shiboken6_INCLUDE_DIRS} CACHE PATH "")
|
||||
set(SHIBOKEN_LIBRARY ${Shiboken6_LIBRARIES} CACHE INTERNAL "")
|
||||
set(SHIBOKEN_FOUND ON CACHE BOOL OFF)
|
||||
endif()
|
||||
|
||||
@@ -8,8 +8,8 @@ macro(CheckInterModuleDependencies)
|
||||
if(${dependent})
|
||||
foreach(prerequisite IN LISTS ARGN)
|
||||
if(NOT ${prerequisite})
|
||||
message(SEND_ERROR "${dependent} requires ${prerequisite} to be ON, but it"
|
||||
" is \"${${prerequisite}}\"")
|
||||
message(STATUS "${dependent} requires ${prerequisite} to be ON, but it"
|
||||
" is \"${${prerequisite}}\"")
|
||||
set(${dependent} OFF PARENT_SCOPE)
|
||||
break()
|
||||
endif(NOT ${prerequisite})
|
||||
@@ -17,19 +17,17 @@ macro(CheckInterModuleDependencies)
|
||||
endif(${dependent})
|
||||
endfunction(REQUIRES_MODS)
|
||||
|
||||
REQUIRES_MODS(BUILD_ASSEMBLY BUILD_PART BUILD_PART_DESIGN BUILD_SPREADSHEET)
|
||||
REQUIRES_MODS(BUILD_BIM BUILD_PART BUILD_MESH BUILD_MESH_PART BUILD_DRAFT)
|
||||
REQUIRES_MODS(BUILD_DRAFT BUILD_SKETCHER BUILD_TECHDRAW)
|
||||
REQUIRES_MODS(BUILD_BIM BUILD_PART BUILD_MESH BUILD_DRAFT)
|
||||
REQUIRES_MODS(BUILD_DRAFT BUILD_SKETCHER)
|
||||
REQUIRES_MODS(BUILD_DRAWING BUILD_PART BUILD_SPREADSHEET)
|
||||
REQUIRES_MODS(BUILD_FEM BUILD_PART)
|
||||
REQUIRES_MODS(BUILD_IMPORT BUILD_PART BUILD_PART_DESIGN)
|
||||
REQUIRES_MODS(BUILD_IDF BUILD_PART)
|
||||
REQUIRES_MODS(BUILD_IMPORT BUILD_PART)
|
||||
REQUIRES_MODS(BUILD_INSPECTION BUILD_MESH BUILD_POINTS BUILD_PART)
|
||||
REQUIRES_MODS(BUILD_JTREADER BUILD_MESH)
|
||||
REQUIRES_MODS(BUILD_MESH_PART BUILD_PART BUILD_MESH)
|
||||
REQUIRES_MODS(BUILD_MESH_PART BUILD_PART BUILD_MESH BUILD_SMESH)
|
||||
REQUIRES_MODS(BUILD_FLAT_MESH BUILD_MESH_PART)
|
||||
REQUIRES_MODS(BUILD_OPENSCAD BUILD_MESH_PART BUILD_DRAFT)
|
||||
REQUIRES_MODS(BUILD_MATERIAL_EXTERNAL BUILD_MATERIAL)
|
||||
REQUIRES_MODS(BUILD_MEASURE BUILD_PART)
|
||||
REQUIRES_MODS(BUILD_PART BUILD_MATERIAL)
|
||||
REQUIRES_MODS(BUILD_PART_DESIGN BUILD_SKETCHER)
|
||||
# REQUIRES_MODS(BUILD_CAM BUILD_PART BUILD_MESH BUILD_ROBOT)
|
||||
@@ -39,6 +37,5 @@ macro(CheckInterModuleDependencies)
|
||||
REQUIRES_MODS(BUILD_SANDBOX BUILD_PART BUILD_MESH)
|
||||
REQUIRES_MODS(BUILD_SKETCHER BUILD_PART)
|
||||
REQUIRES_MODS(BUILD_SPREADSHEET BUILD_DRAFT)
|
||||
REQUIRES_MODS(BUILD_SURFACE BUILD_PART)
|
||||
REQUIRES_MODS(BUILD_TECHDRAW BUILD_PART BUILD_PART_DESIGN BUILD_SPREADSHEET BUILD_MEASURE BUILD_IMPORT)
|
||||
REQUIRES_MODS(BUILD_TECHDRAW BUILD_PART BUILD_SPREADSHEET)
|
||||
endmacro(CheckInterModuleDependencies)
|
||||
|
||||
@@ -84,15 +84,15 @@ macro(ChooseQtVersion)
|
||||
endif ()
|
||||
set(_FREECAD_QT_VERSION "${FREECAD_QT_VERSION}")
|
||||
else ()
|
||||
find_package(Qt6 QUIET COMPONENTS Core)
|
||||
set(_FREECAD_QT_VERSION 6)
|
||||
if (NOT Qt6_FOUND)
|
||||
find_package(Qt5 QUIET COMPONENTS Core)
|
||||
if (NOT Qt5_FOUND)
|
||||
find_package(Qt5 QUIET COMPONENTS Core)
|
||||
set(_FREECAD_QT_VERSION 5)
|
||||
if (NOT Qt5_FOUND)
|
||||
find_package(Qt6 QUIET COMPONENTS Core)
|
||||
if (NOT Qt6_FOUND)
|
||||
message(FATAL_ERROR
|
||||
"Could not find a valid Qt installation. Consider setting Qt5_DIR or Qt6_DIR (as needed).")
|
||||
endif ()
|
||||
set(_FREECAD_QT_VERSION 5)
|
||||
set(_FREECAD_QT_VERSION 6)
|
||||
endif ()
|
||||
endif ()
|
||||
set(FREECAD_QT_MAJOR_VERSION "${_FREECAD_QT_VERSION}" CACHE INTERNAL
|
||||
|
||||
@@ -9,16 +9,17 @@ macro(CompilerChecksAndSetups)
|
||||
|
||||
# ================================================================================
|
||||
|
||||
# Use a heuristic of 1 GiB of RAM needed per compiler job and limit to
|
||||
# a single link job. Modern linkers are multithreaded and running them concurrently
|
||||
# can exhaust resources.
|
||||
cmake_host_system_information(RESULT avail_mem_MiB QUERY TOTAL_PHYSICAL_MEMORY)
|
||||
math(EXPR max_compile_procs "${avail_mem_MiB} / 1024")
|
||||
set_property(GLOBAL PROPERTY JOB_POOLS compile_jobs=${max_compile_procs} link_jobs=1)
|
||||
# Needed for boost1.69
|
||||
# Avoid that Python (pyerrors.h) defines snprintf and vsnprintf
|
||||
if (MSVC AND NOT MSVC_VERSION VERSION_LESS 1900)
|
||||
add_definitions(-DHAVE_SNPRINTF)
|
||||
elseif (MINGW)
|
||||
add_definitions(-DHAVE_SNPRINTF)
|
||||
endif()
|
||||
|
||||
# Allow developers to use Boost < 1.74
|
||||
# Allow developers to use Boost < 1.65
|
||||
if (NOT BOOST_MIN_VERSION)
|
||||
set(BOOST_MIN_VERSION 1.74)
|
||||
set(BOOST_MIN_VERSION 1.65)
|
||||
endif()
|
||||
|
||||
# For older cmake versions the variable 'CMAKE_CXX_COMPILER_VERSION' is missing
|
||||
@@ -27,27 +28,27 @@ macro(CompilerChecksAndSetups)
|
||||
OUTPUT_VARIABLE CMAKE_CXX_COMPILER_VERSION)
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_CXX_COMPILER_VERSION)
|
||||
|
||||
# Enabled C++20 for Freecad 1.1 and later
|
||||
set(BUILD_ENABLE_CXX_STD "C++20" CACHE STRING "Enable C++ standard")
|
||||
set_property(CACHE BUILD_ENABLE_CXX_STD PROPERTY STRINGS
|
||||
"C++20"
|
||||
"C++23"
|
||||
)
|
||||
# Enabled C++17 for Freecad 0.20 and later
|
||||
set(BUILD_ENABLE_CXX_STD "C++17" CACHE STRING "Enable C++ standard")
|
||||
set_property(CACHE BUILD_ENABLE_CXX_STD PROPERTY STRINGS
|
||||
"C++17"
|
||||
"C++20"
|
||||
)
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11.2)
|
||||
message(FATAL_ERROR "FreeCAD 1.1 and later requires C++20. G++ must be 11.2 or later, the used version is ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
elseif(CMAKE_COMPILER_IS_CLANGXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14.0)
|
||||
message(FATAL_ERROR "FreeCAD 1.1 and later requires C++20. Clang must be 14.0 or later, the used version is ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
endif()
|
||||
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.3)
|
||||
message(FATAL_ERROR "FreeCAD 0.20 and later requires C++17. G++ must be 7.3 or later, the used version is ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
elseif(CMAKE_COMPILER_IS_CLANGXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)
|
||||
message(FATAL_ERROR "FreeCAD 0.20 and later requires C++17. Clang must be 6.0 or later, the used version is ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
endif()
|
||||
|
||||
# Escape the two plus chars as otherwise cmake complains about invalid regex
|
||||
if(${BUILD_ENABLE_CXX_STD} MATCHES "C\\+\\+23")
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
else()
|
||||
elseif(${BUILD_ENABLE_CXX_STD} MATCHES "C\\+\\+20")
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
else()#Enabled C++17
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
endif()
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
# Log the compiler and version
|
||||
message(STATUS "Compiler: ${CMAKE_CXX_COMPILER_ID}, version: ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
@@ -57,8 +58,6 @@ macro(CompilerChecksAndSetups)
|
||||
configure_file(${CMAKE_SOURCE_DIR}/src/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
add_definitions(-DHAVE_CONFIG_H)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "-fdiagnostics-color ${CMAKE_CXX_FLAGS}")
|
||||
|
||||
# For now only set pedantic option for clang
|
||||
if(CMAKE_COMPILER_IS_CLANGXX)
|
||||
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wpedantic -Wno-write-strings ${CMAKE_CXX_FLAGS}")
|
||||
@@ -83,15 +82,6 @@ macro(CompilerChecksAndSetups)
|
||||
endif()
|
||||
endif()
|
||||
endif(BUILD_DYNAMIC_LINK_PYTHON)
|
||||
|
||||
if(BUILD_USE_LIBCXX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||
endif()
|
||||
|
||||
if(BUILD_ENABLE_TIME_TRACE)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ftime-trace")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftime-trace")
|
||||
endif()
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
|
||||
|
||||
if(CMAKE_COMPILER_IS_CLANGXX)
|
||||
@@ -100,15 +90,15 @@ macro(CompilerChecksAndSetups)
|
||||
#
|
||||
# https://en.wikipedia.org/wiki/Xcode#Latest_versions
|
||||
if (APPLE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-undefined-var-template")
|
||||
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-undefined-var-template")
|
||||
endif()
|
||||
add_definitions(-DGL_SILENCE_DEPRECATION)
|
||||
elseif (UNIX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-undefined-var-template")
|
||||
endif()
|
||||
|
||||
# boost.preprocessor 1.74 and earlier turns off variadics for clang regardless of version, even though they
|
||||
# work in all versions of clang that we support. Manually force variadic macro support until our oldest
|
||||
# supported version of boost is 1.75 or higher.
|
||||
# older boost.preprocessor turn off variadics for clang
|
||||
add_definitions(-DBOOST_PP_VARIADICS=1)
|
||||
message(STATUS "Force BOOST_PP_VARIADICS=1 for clang")
|
||||
endif()
|
||||
|
||||
@@ -16,10 +16,10 @@ macro(ConfigureCMakeVariables)
|
||||
endif()
|
||||
|
||||
set(PYCXX_INCLUDE_DIR
|
||||
"${CMAKE_SOURCE_DIR}/src/3rdParty/PyCXX" CACHE PATH
|
||||
"${CMAKE_SOURCE_DIR}/src" CACHE PATH
|
||||
"Path to the directory containing PyCXX's CXX/Config.hxx include file")
|
||||
set(PYCXX_SOURCE_DIR
|
||||
"${CMAKE_SOURCE_DIR}/src/3rdParty/PyCXX/CXX" CACHE PATH
|
||||
"${CMAKE_SOURCE_DIR}/src/CXX" CACHE PATH
|
||||
"Path to the directory containing PyCXX's cxxextensions.c source file")
|
||||
|
||||
# used as compiler defines
|
||||
|
||||
@@ -3,12 +3,12 @@ macro(CopyLibpackDirectories)
|
||||
if(FREECAD_COPY_DEPEND_DIRS_TO_BUILD)
|
||||
message(STATUS "Copying libpack dependency directories to build directory...")
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin/assistant.exe DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin/qt.conf DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/platforms DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/imageformats DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/iconengines DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/sqldrivers DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/styles DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/bin/qt.conf "[Paths]\nPrefix=..\n")
|
||||
if(NOT FREECAD_LIBPACK_VERSION VERSION_GREATER_EQUAL "3.0.0")
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/printsupport DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
endif()
|
||||
@@ -45,6 +45,7 @@ macro(CopyLibpackDirectories)
|
||||
if(FREECAD_LIBPACK_VERSION VERSION_LESS "3.1.0")
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/resources DESTINATION ${CMAKE_BINARY_DIR})
|
||||
endif()
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/bin/qt.conf "[Paths]\nPrefix=..\n")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
@@ -4,14 +4,14 @@ macro(CreatePackagingTargets)
|
||||
#
|
||||
#add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
|
||||
add_custom_target(dist-git
|
||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
--bindir=${CMAKE_BINARY_DIR}
|
||||
--major=${PACKAGE_VERSION_MAJOR}
|
||||
--minor=${PACKAGE_VERSION_MINOR}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
add_custom_target(distdfsg-git
|
||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
--bindir=${CMAKE_BINARY_DIR}
|
||||
--major=${PACKAGE_VERSION_MAJOR}
|
||||
--minor=${PACKAGE_VERSION_MINOR}
|
||||
@@ -20,7 +20,7 @@ macro(CreatePackagingTargets)
|
||||
)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX OR MINGW)
|
||||
add_custom_target(distcheck-git
|
||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
--bindir=${CMAKE_BINARY_DIR}
|
||||
--major=${PACKAGE_VERSION_MAJOR}
|
||||
--minor=${PACKAGE_VERSION_MINOR}
|
||||
@@ -28,7 +28,7 @@ macro(CreatePackagingTargets)
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
add_custom_target(distcheckdfsg-git
|
||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
--bindir=${CMAKE_BINARY_DIR}
|
||||
--major=${PACKAGE_VERSION_MAJOR}
|
||||
--minor=${PACKAGE_VERSION_MINOR}
|
||||
|
||||
@@ -10,21 +10,17 @@ macro(InitializeFreeCADBuildOptions)
|
||||
option(FREECAD_USE_EXTERNAL_KDL "Use system installed orocos-kdl instead of the bundled." OFF)
|
||||
option(FREECAD_USE_EXTERNAL_FMT "Use system installed fmt library if available instead of fetching the source." ON)
|
||||
option(FREECAD_USE_EXTERNAL_ONDSELSOLVER "Use system installed OndselSolver instead of git submodule." OFF)
|
||||
option(FREECAD_USE_EXTERNAL_E57FORMAT "Use system installed libE57Format instead of the bundled." OFF)
|
||||
option(FREECAD_USE_EXTERNAL_GTEST "Use system installed Google Test and Google Mock" OFF)
|
||||
option(FREECAD_USE_FREETYPE "Builds the features using FreeType libs" ON)
|
||||
option(FREECAD_BUILD_DEBIAN "Prepare for a build of a Debian package" OFF)
|
||||
option(FREECAD_CHECK_PIVY "Check for pivy version using Python at build time" ON)
|
||||
option(FREECAD_PARALLEL_COMPILE_JOBS "Compilation jobs pool size to fit memory limitations.")
|
||||
option(FREECAD_PARALLEL_LINK_JOBS "Linkage jobs pool size to fit memory limitations.")
|
||||
option(BUILD_WITH_CONDA "Set ON if you build FreeCAD with conda" OFF)
|
||||
option(BUILD_DYNAMIC_LINK_PYTHON "If OFF extension-modules do not link against python-libraries" ON)
|
||||
option(BUILD_TRACY_FRAME_PROFILER "If ON then enables support for the Tracy frame profiler" OFF)
|
||||
|
||||
option(INSTALL_TO_SITEPACKAGES "If ON the freecad root namespace (python) is installed into python's site-packages" ON)
|
||||
option(INSTALL_PREFER_SYMLINKS "If ON then fc_copy_sources macro will create symlinks instead of copying files" OFF)
|
||||
option(OCCT_CMAKE_FALLBACK "disable usage of occt-config files" OFF)
|
||||
option(FREECAD_USE_QT_DIALOGS "Use Qt's dialogs instead of the native one." OFF)
|
||||
if (WIN32 OR APPLE)
|
||||
option(FREECAD_USE_QT_FILEDIALOG "Use Qt's file dialog instead of the native one." OFF)
|
||||
else()
|
||||
option(FREECAD_USE_QT_FILEDIALOG "Use Qt's file dialog instead of the native one." ON)
|
||||
endif()
|
||||
|
||||
# == Win32 is default behaviour use the LibPack copied in Source tree ==========
|
||||
if(MSVC)
|
||||
@@ -72,6 +68,15 @@ macro(InitializeFreeCADBuildOptions)
|
||||
|
||||
ChooseQtVersion()
|
||||
|
||||
# https://blog.kitware.com/constraining-values-with-comboboxes-in-cmake-cmake-gui/
|
||||
set(FREECAD_USE_OCC_VARIANT "Community Edition" CACHE STRING "Official OpenCASCADE version or community edition")
|
||||
set_property(CACHE FREECAD_USE_OCC_VARIANT PROPERTY STRINGS
|
||||
"Official Version"
|
||||
"Community Edition"
|
||||
)
|
||||
|
||||
configure_file(${CMAKE_SOURCE_DIR}/src/QtOpenGL.h.cmake ${CMAKE_BINARY_DIR}/src/QtOpenGL.h)
|
||||
|
||||
option(BUILD_DESIGNER_PLUGIN "Build and install the designer plugin" OFF)
|
||||
|
||||
if(APPLE)
|
||||
@@ -111,7 +116,6 @@ macro(InitializeFreeCADBuildOptions)
|
||||
option(BUILD_INSPECTION "Build the FreeCAD inspection module" ON)
|
||||
option(BUILD_JTREADER "Build the FreeCAD jt reader module" OFF)
|
||||
option(BUILD_MATERIAL "Build the FreeCAD material module" ON)
|
||||
option(BUILD_MATERIAL_EXTERNAL "Build the FreeCAD material external interface module" OFF)
|
||||
option(BUILD_MESH "Build the FreeCAD mesh module" ON)
|
||||
option(BUILD_MESH_PART "Build the FreeCAD mesh part module" ON)
|
||||
option(BUILD_FLAT_MESH "Build the FreeCAD flat mesh module" ON)
|
||||
@@ -166,7 +170,7 @@ macro(InitializeFreeCADBuildOptions)
|
||||
|
||||
if(MSVC)
|
||||
option(BUILD_FEM_NETGEN "Build the FreeCAD FEM module with the NETGEN mesher" ON)
|
||||
option(FREECAD_USE_PCL "Build the features that use PCL libs" OFF)
|
||||
option(FREECAD_USE_PCL "Build the features that use PCL libs" OFF) # 3/5/2021 current LibPack uses non-C++17 FLANN
|
||||
endif(MSVC)
|
||||
if(NOT MSVC)
|
||||
option(BUILD_FEM_NETGEN "Build the FreeCAD FEM module with the NETGEN mesher" OFF)
|
||||
@@ -175,28 +179,19 @@ macro(InitializeFreeCADBuildOptions)
|
||||
|
||||
# if this is set override some options
|
||||
if (FREECAD_BUILD_DEBIAN)
|
||||
# Disable it until the upstream package has been fixed. See
|
||||
# https://github.com/FreeCAD/FreeCAD/issues/13676#issuecomment-2539978468
|
||||
# https://github.com/FreeCAD/FreeCAD/issues/13676#issuecomment-2541513308
|
||||
set(FREECAD_USE_EXTERNAL_ZIPIOS OFF )
|
||||
set(FREECAD_USE_EXTERNAL_ZIPIOS ON )
|
||||
# A Debian package for SMESH doesn't exist
|
||||
#set(FREECAD_USE_EXTERNAL_SMESH ON )
|
||||
endif (FREECAD_BUILD_DEBIAN)
|
||||
|
||||
if(BUILD_FEM OR BUILD_MESH_PART)
|
||||
set(FREECAD_USE_SMESH ON)
|
||||
if(FREECAD_USE_EXTERNAL_SMESH)
|
||||
set(BUILD_SMESH OFF)
|
||||
else()
|
||||
set(BUILD_SMESH ON)
|
||||
endif()
|
||||
else()
|
||||
set(FREECAD_USE_SMESH OFF)
|
||||
set(BUILD_SMESH OFF)
|
||||
if(BUILD_FEM)
|
||||
set(BUILD_SMESH ON )
|
||||
endif()
|
||||
|
||||
if (BUILD_CAM OR BUILD_FLAT_MESH)
|
||||
set(FREECAD_USE_PYBIND11 ON)
|
||||
# for Windows the minimum required cmake version is 3.4.3 to build the CAM module
|
||||
if(WIN32 AND CMAKE_VERSION VERSION_LESS 3.4.3)
|
||||
message(WARNING "Disable CAM, requires cmake >= 3.4.3 in order to build this module")
|
||||
set(BUILD_CAM OFF )
|
||||
endif()
|
||||
|
||||
# force build directory to be different to source directory
|
||||
@@ -206,22 +201,4 @@ macro(InitializeFreeCADBuildOptions)
|
||||
"Please choose another build directory! Or disable the option BUILD_FORCE_DIRECTORY.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(FREECAD_PARALLEL_COMPILE_JOBS)
|
||||
if(CMAKE_GENERATOR MATCHES "Ninja")
|
||||
set_property(GLOBAL APPEND PROPERTY JOB_POOLS compile_job_pool=${FREECAD_PARALLEL_COMPILE_JOBS})
|
||||
set(CMAKE_JOB_POOL_COMPILE compile_job_pool)
|
||||
else()
|
||||
message(WARNING "Job pooling is only available with Ninja generators.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(FREECAD_PARALLEL_LINK_JOBS)
|
||||
if(CMAKE_GENERATOR MATCHES "Ninja")
|
||||
set_property(GLOBAL APPEND PROPERTY JOB_POOLS link_job_pool=${FREECAD_PARALLEL_LINK_JOBS})
|
||||
set(CMAKE_JOB_POOL_LINK link_job_pool)
|
||||
else()
|
||||
message(WARNING "Job pooling is only available with Ninja generators.")
|
||||
endif()
|
||||
endif()
|
||||
endmacro(InitializeFreeCADBuildOptions)
|
||||
|
||||
@@ -14,7 +14,7 @@ macro(PrintFinalReport)
|
||||
|
||||
# just a value
|
||||
macro(value)
|
||||
unset(val)
|
||||
unset(val)
|
||||
set(name ${ARGV0})
|
||||
if(${name})
|
||||
set(val ${${name}}) # name has a value
|
||||
@@ -58,14 +58,13 @@ macro(PrintFinalReport)
|
||||
|
||||
simple(Compiler "${CMAKE_CXX_COMPILER} (${CMAKE_CXX_COMPILER_VERSION})")
|
||||
value(CMAKE_VERSION)
|
||||
conditional(ccache CCACHE_PROGRAM "not enabled" ${CCACHE_PROGRAM})
|
||||
simple(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
simple(bindir ${CMAKE_INSTALL_BINDIR})
|
||||
simple(datadir ${CMAKE_INSTALL_DATADIR})
|
||||
simple(docdir ${CMAKE_INSTALL_DOCDIR})
|
||||
simple(includedir ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
simple(libdir ${CMAKE_INSTALL_LIBDIR})
|
||||
simple(Python "${Python3_VERSION} [${Python3_EXECUTABLE}] Suffix: [${PYTHON_CONFIG_SUFFIX}]")
|
||||
simple(Python "${Python3_VERSION} [${PYTHON_EXECUTABLE}] Suffix: [${PYTHON_CONFIG_SUFFIX}]")
|
||||
value(BLAS)
|
||||
|
||||
section_end()
|
||||
@@ -84,12 +83,11 @@ macro(PrintFinalReport)
|
||||
value(BUILD_VR)
|
||||
value(CMAKE_PREFIX_PATH)
|
||||
value(FREECAD_QT_VERSION)
|
||||
value(Python3_EXECUTABLE)
|
||||
value(PYTHON_EXECUTABLE)
|
||||
value(PYTHON_LIBRARY)
|
||||
value(FREECAD_CREATE_MAC_APP)
|
||||
value(FREECAD_USE_PYBIND11)
|
||||
value(FREECAD_USE_EXTERNAL_KDL)
|
||||
value(FREECAD_USE_PYSIDE)
|
||||
value(FREECAD_USE_SHIBOKEN)
|
||||
value(BUILD_ADDONMGR)
|
||||
value(BUILD_BIM)
|
||||
value(BUILD_ASSEMBLY)
|
||||
@@ -104,7 +102,6 @@ macro(PrintFinalReport)
|
||||
value(BUILD_INSPECTION)
|
||||
value(BUILD_JTREADER)
|
||||
value(BUILD_MATERIAL)
|
||||
value(BUILD_MATERIAL_EXTERNAL)
|
||||
value(BUILD_MESH)
|
||||
value(BUILD_MESH_PART)
|
||||
value(BUILD_OPENSCAD)
|
||||
@@ -141,20 +138,20 @@ macro(PrintFinalReport)
|
||||
conditional(pybind11 pybind11_FOUND "not enabled" ${pybind11_VERSION})
|
||||
simple(Boost ${Boost_VERSION})
|
||||
simple(XercesC "${XercesC_VERSION} [${XercesC_LIBRARIES}] [${XercesC_INCLUDE_DIRS}]")
|
||||
simple(ICU "${ICU_VERSION}")
|
||||
simple(ZLIB "${ZLIB_VERSION_STRING}")
|
||||
simple(OCC "${OCC_VERSION_STRING} [${OCC_LIBRARY_DIR}] [${OCC_INCLUDE_DIR}]")
|
||||
simple(OCC_Libs "[${OCC_LIBRARIES}]")
|
||||
if(FREECAD_USE_SMESH)
|
||||
if(BUILD_SMESH)
|
||||
if(FREECAD_USE_EXTERNAL_SMESH)
|
||||
simple(SMESH "${SMESH_VERSION_MAJOR}.${SMESH_VERSION_MINOR}.${SMESH_VERSION_PATCH}.${SMESH_VERSION_TWEAK}")
|
||||
else()
|
||||
simple(SMESH "${SMESH_VERSION_MAJOR}.${SMESH_VERSION_MINOR}.${SMESH_VERSION_PATCH}.${SMESH_VERSION_TWEAK} build internal")
|
||||
simple(MEDFile "${MEDFILE_VERSION} [${MEDFILE_LIBRARIES}] [${MEDFILE_INCLUDE_DIRS}]")
|
||||
simple(HDF5 ${HDF5_VERSION})
|
||||
simple(VTK ${VTK_VERSION})
|
||||
endif()
|
||||
else()
|
||||
simple(SMESH "not enabled")
|
||||
simple(SMESH "do not build")
|
||||
endif()
|
||||
conditional(NETGEN NETGEN_FOUND
|
||||
"not enabled"
|
||||
@@ -167,7 +164,6 @@ macro(PrintFinalReport)
|
||||
simple(QtCore ${QtCore_VERSION})
|
||||
simple(QtNetwork ${QtNetwork_VERSION})
|
||||
conditional(QtOpenGL BUILD_GUI "not needed" ${QtOpenGL_VERSION})
|
||||
conditional(QtOpenGLWidgets BUILD_GUI "not needed" ${QtOpenGLWidgets_VERSION})
|
||||
conditional(QtPrintSupport BUILD_GUI "not needed" ${QtPrintSupport_VERSION})
|
||||
conditional(QtSvg BUILD_GUI "not needed" ${QtSvg_VERSION})
|
||||
conditional(QtUiTools BUILD_GUI "not needed" ${QtUiTools_VERSION})
|
||||
@@ -220,7 +216,6 @@ macro(PrintFinalReport)
|
||||
conditional(PYCXX PYCXX_FOUND "not found" "${PYCXX_VERSION} Incl: ${PYCXX_INCLUDE_DIR} Src:${PYCXX_SOURCE_DIR}")
|
||||
conditional(fmt fmt_FOUND "Sources downloaded to ${fmt_SOURCE_DIR}" "${fmt_VERSION}")
|
||||
conditional(yaml-cpp yaml-cpp_FOUND "not found" "${yaml-cpp_VERSION}")
|
||||
conditional(Vtk VTK_FOUND "not found" ${VTK_VERSION})
|
||||
|
||||
section_end()
|
||||
|
||||
|
||||
@@ -19,29 +19,18 @@ macro(SetGlobalCompilerAndLinkerSettings)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mxgot")
|
||||
endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU")
|
||||
# Only add -O0 if no -O* optimization flag exists
|
||||
if (NOT "${CMAKE_C_FLAGS_DEBUG}" MATCHES "-O[a-z0-9]+")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0")
|
||||
endif()
|
||||
if (NOT "${CMAKE_CXX_FLAGS_DEBUG}" MATCHES "-O[a-z0-9]+")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0")
|
||||
endif()
|
||||
endif()
|
||||
if(MSVC)
|
||||
# set default compiler settings
|
||||
add_definitions(-D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR -DNOMINMAX)
|
||||
add_compile_options(/Zm150 /bigobj)
|
||||
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DFC_DEBUG")
|
||||
if (MSVC_VERSION LESS 1930) # Anything before VS 2022
|
||||
# set default libs
|
||||
set (CMAKE_C_STANDARD_LIBRARIES "kernel32.lib user32.lib gdi32.lib winspool.lib SHFolder.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib winmm.lib comsupp.lib Ws2_32.lib dbghelp.lib ")
|
||||
set (CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES}")
|
||||
# set linker flag /nodefaultlib
|
||||
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB")
|
||||
set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /NODEFAULTLIB")
|
||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB")
|
||||
endif()
|
||||
# set default libs
|
||||
set (CMAKE_C_STANDARD_LIBRARIES "kernel32.lib user32.lib gdi32.lib winspool.lib SHFolder.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib winmm.lib comsupp.lib Ws2_32.lib dbghelp.lib ")
|
||||
set (CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES}")
|
||||
# set linker flag /nodefaultlib
|
||||
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB")
|
||||
set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /NODEFAULTLIB")
|
||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB")
|
||||
if(FREECAD_RELEASE_PDB)
|
||||
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
|
||||
set (CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG")
|
||||
|
||||
@@ -3,7 +3,7 @@ macro(SetupBoost)
|
||||
|
||||
set(_boost_TEST_VERSIONS ${Boost_ADDITIONAL_VERSIONS})
|
||||
|
||||
set (BOOST_COMPONENTS program_options regex thread date_time)
|
||||
set (BOOST_COMPONENTS filesystem program_options regex system thread date_time)
|
||||
find_package(Boost ${BOOST_MIN_VERSION}
|
||||
COMPONENTS ${BOOST_COMPONENTS} REQUIRED)
|
||||
|
||||
|
||||
@@ -6,22 +6,16 @@ macro(SetupCoin3D)
|
||||
find_library(COIN3D_LIBRARIES Coin)
|
||||
endif ()
|
||||
|
||||
# Try CONFIG mode -- Coin supports very old CMake files, which emits noisy warnings. Silence them.
|
||||
set(CMAKE_WARN_DEPRECATED_OLD_STATE ${CMAKE_WARN_DEPRECATED})
|
||||
set(CMAKE_WARN_DEPRECATED OFF CACHE BOOL "" FORCE)
|
||||
find_package(Coin CONFIG)
|
||||
set(CMAKE_WARN_DEPRECATED ${CMAKE_WARN_DEPRECATED_OLD_STATE} CACHE BOOL "" FORCE)
|
||||
if (Coin_FOUND)
|
||||
set(COIN3D_INCLUDE_DIRS ${Coin_INCLUDE_DIR})
|
||||
set(COIN3D_LIBRARIES ${Coin_LIBRARIES})
|
||||
set(COIN3D_LIB_DIRS ${Coin_LIB_DIR})
|
||||
else ()
|
||||
# Try MODULE mode (FindCoin3D.cmake, included by CMake)
|
||||
find_package(Coin3D)
|
||||
if (NOT COIN3D_FOUND)
|
||||
message(FATAL_ERROR "Could not find Coin3D")
|
||||
# Try MODULE mode
|
||||
find_package(Coin3D)
|
||||
if (NOT COIN3D_FOUND)
|
||||
# Try CONFIG mode
|
||||
find_package(Coin CONFIG REQUIRED)
|
||||
if (Coin_FOUND)
|
||||
set(COIN3D_INCLUDE_DIRS ${Coin_INCLUDE_DIR})
|
||||
set(COIN3D_LIBRARIES ${Coin_LIBRARIES})
|
||||
endif ()
|
||||
endif ()
|
||||
ENDIF ()
|
||||
|
||||
IF (NOT COIN3D_VERSION)
|
||||
file(READ "${COIN3D_INCLUDE_DIRS}/Inventor/C/basic.h" _coin3d_basic_h)
|
||||
@@ -33,50 +27,18 @@ macro(SetupCoin3D)
|
||||
set(COIN3D_MICRO_VERSION "${CMAKE_MATCH_1}")
|
||||
set(COIN3D_VERSION "${COIN3D_MAJOR_VERSION}.${COIN3D_MINOR_VERSION}.${COIN3D_MICRO_VERSION}")
|
||||
ENDIF ()
|
||||
endmacro(SetupCoin3D)
|
||||
|
||||
macro(SetupPivy)
|
||||
# -------------------------------- Pivy --------------------------------
|
||||
|
||||
IF (FREECAD_CHECK_PIVY) # do not make pivy a host dependency for cross compiling
|
||||
IF (NOT PIVY_VERSION)
|
||||
message(STATUS "Checking Pivy version by importing it in a Python program...")
|
||||
execute_process(
|
||||
COMMAND ${Python3_EXECUTABLE} -c "import pivy as p; print(p.__version__,end='')"
|
||||
OUTPUT_VARIABLE PIVY_VERSION
|
||||
RESULT_VARIABLE RETURN_CODE)
|
||||
if (RETURN_CODE EQUAL 0)
|
||||
message(STATUS "Found Pivy ${PIVY_VERSION}")
|
||||
else ()
|
||||
message(ERROR "Failed to import Pivy using ${Python3_EXECUTABLE}")
|
||||
endif ()
|
||||
ENDIF ()
|
||||
|
||||
message(STATUS "Checking Pivy Coin3D version by importing it in a Python program...")
|
||||
IF (NOT PIVY_VERSION)
|
||||
message(STATUS "Checking Pivy version by importing it in a Python program...")
|
||||
execute_process(
|
||||
COMMAND ${Python3_EXECUTABLE} -c "import pivy as p; print(p.SoDB.getVersion(),end='')"
|
||||
OUTPUT_VARIABLE PIVY_COIN_VERSION
|
||||
COMMAND ${Python3_EXECUTABLE} -c "import pivy as p; print(p.__version__,end='')"
|
||||
OUTPUT_VARIABLE PIVY_VERSION
|
||||
RESULT_VARIABLE RETURN_CODE)
|
||||
if (RETURN_CODE EQUAL 0)
|
||||
message(STATUS "Found Pivy Coin3D ${PIVY_COIN_VERSION}")
|
||||
message(STATUS "Found Pivy ${PIVY_VERSION}")
|
||||
else ()
|
||||
message(ERROR "Failed to get Pivy Coin3D version using ${Python3_EXECUTABLE}")
|
||||
message(ERROR "Failed to import Pivy using ${Python3_EXECUTABLE}")
|
||||
endif ()
|
||||
ENDIF ()
|
||||
|
||||
if (${PIVY_COIN_VERSION} MATCHES "([0-9]+)\\.([0-9]+)\\.([0-9]+)")
|
||||
set(PIVY_COIN_MAJOR_VERSION ${CMAKE_MATCH_1})
|
||||
set(PIVY_COIN_MINOR_VERSION ${CMAKE_MATCH_2})
|
||||
set(PIVY_COIN_MICRO_VERSION ${CMAKE_MATCH_3})
|
||||
set(PIVY_COIN_VERSION "${PIVY_COIN_MAJOR_VERSION}.${PIVY_COIN_MINOR_VERSION}.${PIVY_COIN_MICRO_VERSION}")
|
||||
else ()
|
||||
message(FATAL_ERROR "Failed to match Pivy Coin3D version string output")
|
||||
endif ()
|
||||
|
||||
if (NOT (
|
||||
(${COIN3D_MAJOR_VERSION} EQUAL ${PIVY_COIN_MAJOR_VERSION}) AND
|
||||
(${COIN3D_MINOR_VERSION} EQUAL ${PIVY_COIN_MINOR_VERSION}) AND
|
||||
(${COIN3D_MICRO_VERSION} EQUAL ${PIVY_COIN_MICRO_VERSION})))
|
||||
message(FATAL_ERROR "Coin3D version ${COIN3D_VERSION} mismatches Pivy Coin3D ${PIVY_COIN_VERSION}.")
|
||||
endif ()
|
||||
endif(FREECAD_CHECK_PIVY)
|
||||
endmacro(SetupPivy)
|
||||
endmacro(SetupCoin3D)
|
||||
|
||||
@@ -11,10 +11,19 @@ macro(SetupEigen)
|
||||
"=================\n")
|
||||
endif(NOT EIGEN3_FOUND)
|
||||
|
||||
if (EIGEN3_FOUND AND ${EIGEN3_VERSION} VERSION_LESS "3.4.0")
|
||||
if (EIGEN3_FOUND AND ${EIGEN3_VERSION} VERSION_LESS "3.3.1")
|
||||
message(WARNING "Disable module flatmesh because it requires "
|
||||
"minimum Eigen3 version 3.4.0 but version ${EIGEN3_VERSION} was found")
|
||||
"minimum Eigen3 version 3.3.1 but version ${EIGEN3_VERSION} was found")
|
||||
set (BUILD_FLAT_MESH OFF)
|
||||
endif()
|
||||
|
||||
# Older versions raise the warning -Wdeprecated-copy with clang10/gcc10
|
||||
if (EIGEN3_FOUND AND ${EIGEN3_VERSION} VERSION_LESS "3.3.8")
|
||||
unset(_flag_found CACHE)
|
||||
check_cxx_compiler_flag("-Wno-deprecated-copy" _flag_found)
|
||||
if (_flag_found)
|
||||
set (EIGEN3_NO_DEPRECATED_COPY "-Wno-deprecated-copy")
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
endmacro(SetupEigen)
|
||||
|
||||
@@ -34,8 +34,8 @@ macro(SetupLibFmt)
|
||||
cmake_policy(SET CMP0135 NEW)
|
||||
endif()
|
||||
FetchContent_Declare(fmt
|
||||
URL https://github.com/fmtlib/fmt/archive/refs/tags/11.1.4.zip
|
||||
URL_MD5 90667b07f34d91554cf8285ae234ff66
|
||||
URL https://github.com/fmtlib/fmt/archive/refs/tags/9.1.0.zip
|
||||
URL_MD5 e6754011ff56bfc37631fcc90961e377
|
||||
)
|
||||
FetchContent_MakeAvailable(fmt)
|
||||
set_target_properties(fmt PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
macro(SetupOpenCasCade)
|
||||
# -------------------------------- OpenCasCade --------------------------------
|
||||
|
||||
find_package(OCC)
|
||||
if(NOT OCC_FOUND)
|
||||
message(FATAL_ERROR "================================================================\n"
|
||||
"OpenCASCADE not found!\n"
|
||||
"Neither OpenCASCADE Community Edition nor OpenCASCADE was found!\n"
|
||||
"================================================================\n")
|
||||
endif()
|
||||
endmacro()
|
||||
endif(NOT OCC_FOUND)
|
||||
|
||||
endmacro(SetupOpenCasCade)
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
macro(SetupOpenGL)
|
||||
# -------------------------------- OpenGL --------------------------------
|
||||
|
||||
# If on a system with both a legacy GL library and GLVND, prefer the legacy library.
|
||||
# This is probably needed until we no longer have any gl.*ARB calls in the codebase
|
||||
# See, e.g. SoBrepFaceSet.cpp
|
||||
set(OpenGL_GL_PREFERENCE LEGACY)
|
||||
|
||||
find_package(OpenGL)
|
||||
include(FindPackageMessage)
|
||||
if(OPENGL_GLU_FOUND)
|
||||
|
||||
@@ -2,6 +2,7 @@ macro(SetupPybind11)
|
||||
# -------------------------------- PyBind11 -----------------------------
|
||||
|
||||
# necessary for flat-mesh feature
|
||||
option(FREECAD_USE_PYBIND11 "Use pybind11" OFF)
|
||||
if (FREECAD_USE_PYBIND11)
|
||||
find_package(pybind11 REQUIRED)
|
||||
endif()
|
||||
|
||||
@@ -3,12 +3,7 @@ macro(SetupPython)
|
||||
|
||||
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
|
||||
|
||||
if (${Python3_VERSION} VERSION_LESS "3.10")
|
||||
message(FATAL_ERROR "To build FreeCAD you need at least Python 3.10\n")
|
||||
endif()
|
||||
|
||||
# For backwards compatibility with old CMake scripts
|
||||
# See: https://github.com/FreeCAD/FreeCAD/pull/19635#issuecomment-2725612407
|
||||
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
|
||||
set(PYTHON_LIBRARIES ${Python3_LIBRARIES})
|
||||
set(PYTHON_INCLUDE_DIRS ${Python3_INCLUDE_DIRS})
|
||||
@@ -19,4 +14,8 @@ macro(SetupPython)
|
||||
set(PYTHON_VERSION_PATCH ${Python3_VERSION_PATCH})
|
||||
set(PYTHONINTERP_FOUND ${Python3_Interpreter_FOUND})
|
||||
|
||||
if (${PYTHON_VERSION_STRING} VERSION_LESS "3.8")
|
||||
message(FATAL_ERROR "To build FreeCAD you need at least Python 3.8\n")
|
||||
endif()
|
||||
|
||||
endmacro(SetupPython)
|
||||
|
||||
@@ -13,7 +13,6 @@ if(BUILD_GUI)
|
||||
elseif (FREECAD_QT_MAJOR_VERSION EQUAL 6)
|
||||
list (APPEND FREECAD_QT_COMPONENTS GuiTools)
|
||||
list (APPEND FREECAD_QT_COMPONENTS SvgWidgets)
|
||||
list (APPEND FREECAD_QT_COMPONENTS OpenGLWidgets)
|
||||
endif()
|
||||
|
||||
list (APPEND FREECAD_QT_COMPONENTS OpenGL PrintSupport Svg UiTools Widgets LinguistTools)
|
||||
@@ -79,7 +78,6 @@ else()
|
||||
endif()
|
||||
|
||||
configure_file(${CMAKE_SOURCE_DIR}/src/QtCore.h.cmake ${CMAKE_BINARY_DIR}/src/QtCore.h)
|
||||
configure_file(${CMAKE_SOURCE_DIR}/src/QtWidgets.h.cmake ${CMAKE_BINARY_DIR}/src/QtWidgets.h)
|
||||
|
||||
function(qt_find_and_add_translation _qm_files _tr_dir _qm_dir)
|
||||
file(GLOB _ts_files ${_tr_dir})
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
macro(SetupSalomeSMESH)
|
||||
# -------------------------------- Salome SMESH --------------------------
|
||||
# Salome SMESH sources are under src/3rdParty now
|
||||
if(FREECAD_USE_SMESH)
|
||||
|
||||
# Salome SMESH sources are under src/3rdParty now
|
||||
if(BUILD_SMESH)
|
||||
# set the internal smesh version:
|
||||
# see src/3rdParty/salomonemesh/CMakeLists.txt and commit https://github.com/FreeCAD/FreeCAD/commit/666a3e5 and https://forum.freecad.org/viewtopic.php?f=10&t=30838
|
||||
set(SMESH_VERSION_MAJOR 7)
|
||||
@@ -42,7 +42,7 @@ macro(SetupSalomeSMESH)
|
||||
endif()
|
||||
endforeach()
|
||||
else()
|
||||
set(VTK_COMPONENTS "CommonCore;CommonDataModel;FiltersVerdict;IOXML;FiltersCore;FiltersGeneral;IOLegacy;FiltersExtraction;FiltersSources;FiltersGeometry;WrappingPythonCore")
|
||||
set(VTK_COMPONENTS "CommonCore;CommonDataModel;FiltersVerdict;IOXML;FiltersCore;FiltersGeneral;IOLegacy;FiltersExtraction;FiltersSources;FiltersGeometry")
|
||||
list(APPEND VTK_COMPONENTS "IOMPIParallel;ParallelMPI;hdf5;FiltersParallelDIY2;RenderingCore;InteractionStyle;RenderingFreeType;RenderingOpenGL2")
|
||||
foreach(_module ${VTK_COMPONENTS})
|
||||
list (FIND VTK_AVAILABLE_COMPONENTS ${_module} _index)
|
||||
@@ -63,17 +63,6 @@ macro(SetupSalomeSMESH)
|
||||
endif()
|
||||
|
||||
set(BUILD_FEM_VTK ON)
|
||||
|
||||
# Check if PythonWrapperCore was found
|
||||
# Note: VTK 9 only, as the implementations use the VTK modules introduced in 8.1
|
||||
# VTK_WrappingPythonCore_FOUND is named differently for versions <9.0
|
||||
if (${VTK_WrappingPythonCore_FOUND})
|
||||
set(BUILD_FEM_VTK_PYTHON 1)
|
||||
message(STATUS "VTK python wrapper: available")
|
||||
else()
|
||||
message(STATUS "VTK python wrapper: NOT available")
|
||||
endif()
|
||||
|
||||
if(${VTK_MAJOR_VERSION} LESS 6)
|
||||
message( FATAL_ERROR "Found VTK version is <6, this is not compatible" )
|
||||
endif()
|
||||
@@ -113,6 +102,10 @@ macro(SetupSalomeSMESH)
|
||||
add_compile_options(${HDF5_CFLAGS})
|
||||
link_directories(${HDF5_LIBRARY_DIRS})
|
||||
link_libraries(${HDF5_LIBRARIES})
|
||||
find_file(Hdf5dotH hdf5.h PATHS ${HDF5_INCLUDE_DIRS} NO_DEFAULT_PATH)
|
||||
if(NOT Hdf5dotH)
|
||||
message( FATAL_ERROR "${HDF5_VARIANT} development header not found.")
|
||||
endif()
|
||||
endif()
|
||||
check_include_file_cxx(hdf5.h HDF5_FOUND)
|
||||
if(NOT HDF5_FOUND)
|
||||
@@ -152,6 +145,6 @@ macro(SetupSalomeSMESH)
|
||||
|
||||
set(SMESH_FOUND TRUE)
|
||||
configure_file(${CMAKE_SOURCE_DIR}/src/SMESH_Version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/SMESH_Version.h)
|
||||
endif(FREECAD_USE_SMESH)
|
||||
endif(BUILD_SMESH)
|
||||
|
||||
endmacro(SetupSalomeSMESH)
|
||||
|
||||
@@ -59,18 +59,15 @@ macro(SetupShibokenAndPyside)
|
||||
|
||||
find_package(PySide${PYSIDE_MAJOR_VERSION} QUIET)
|
||||
|
||||
if(${PYSIDE_MAJOR_VERSION} EQUAL 2)
|
||||
# Our internal FindPySide6.cmake file already provides these for PySide6
|
||||
if(NOT PYSIDE_INCLUDE_DIR AND TARGET PySide${PYSIDE_MAJOR_VERSION}::pyside${PYSIDE_MAJOR_VERSION})
|
||||
get_property(PYSIDE_INCLUDE_DIR TARGET PySide${PYSIDE_MAJOR_VERSION}::pyside${PYSIDE_MAJOR_VERSION} PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
|
||||
endif(NOT PYSIDE_INCLUDE_DIR AND TARGET PySide${PYSIDE_MAJOR_VERSION}::pyside${PYSIDE_MAJOR_VERSION})
|
||||
if(NOT PYSIDE_INCLUDE_DIR AND TARGET PySide${PYSIDE_MAJOR_VERSION}::pyside${PYSIDE_MAJOR_VERSION})
|
||||
get_property(PYSIDE_INCLUDE_DIR TARGET PySide${PYSIDE_MAJOR_VERSION}::pyside${PYSIDE_MAJOR_VERSION} PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
|
||||
endif(NOT PYSIDE_INCLUDE_DIR AND TARGET PySide${PYSIDE_MAJOR_VERSION}::pyside${PYSIDE_MAJOR_VERSION})
|
||||
|
||||
if(NOT PYSIDE_INCLUDE_DIR)
|
||||
find_pip_package(PySide${PYSIDE_MAJOR_VERSION})
|
||||
if (PySide${PYSIDE_MAJOR_VERSION}_FOUND)
|
||||
set(PYSIDE_INCLUDE_DIR ${PySide${PYSIDE_MAJOR_VERSION}_INCLUDE_DIRS})
|
||||
set(PYSIDE_LIBRARY ${PySide${PYSIDE_MAJOR_VERSION}_LIBRARIES})
|
||||
endif()
|
||||
if(NOT PYSIDE_INCLUDE_DIR)
|
||||
find_pip_package(PySide${PYSIDE_MAJOR_VERSION})
|
||||
if (PySide${PYSIDE_MAJOR_VERSION}_FOUND)
|
||||
set(PYSIDE_INCLUDE_DIR ${PySide${PYSIDE_MAJOR_VERSION}_INCLUDE_DIRS})
|
||||
set(PYSIDE_LIBRARY ${PySide${PYSIDE_MAJOR_VERSION}_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -131,7 +128,7 @@ macro(SetupShibokenAndPyside)
|
||||
|
||||
# Now try to import the shiboken Python module and print a warning if it can't be loaded
|
||||
execute_process(
|
||||
COMMAND ${Python3_EXECUTABLE} -c "import shiboken${SHIBOKEN_MAJOR_VERSION}"
|
||||
COMMAND ${PYTHON_EXECUTABLE} -c "import shiboken${SHIBOKEN_MAJOR_VERSION}"
|
||||
RESULT_VARIABLE FAILURE
|
||||
OUTPUT_VARIABLE PRINT_OUTPUT
|
||||
)
|
||||
@@ -143,7 +140,7 @@ macro(SetupShibokenAndPyside)
|
||||
"==================================\n")
|
||||
else()
|
||||
execute_process(
|
||||
COMMAND ${Python3_EXECUTABLE} -c "import shiboken${SHIBOKEN_MAJOR_VERSION};print(shiboken${SHIBOKEN_MAJOR_VERSION}.__version__, end='')"
|
||||
COMMAND ${PYTHON_EXECUTABLE} -c "import shiboken${SHIBOKEN_MAJOR_VERSION};print(shiboken${SHIBOKEN_MAJOR_VERSION}.__version__, end='')"
|
||||
RESULT_VARIABLE FAILURE
|
||||
OUTPUT_VARIABLE Shiboken_VERSION
|
||||
)
|
||||
@@ -157,7 +154,7 @@ macro(SetupShibokenAndPyside)
|
||||
|
||||
# Independent of the build option PySide modules must be loaded at runtime. Print a warning if it fails.
|
||||
execute_process(
|
||||
COMMAND ${Python3_EXECUTABLE} -c "import PySide${PYSIDE_MAJOR_VERSION};import os;print(os.path.dirname(PySide${PYSIDE_MAJOR_VERSION}.__file__), end='')"
|
||||
COMMAND ${PYTHON_EXECUTABLE} -c "import PySide${PYSIDE_MAJOR_VERSION};import os;print(os.path.dirname(PySide${PYSIDE_MAJOR_VERSION}.__file__), end='')"
|
||||
RESULT_VARIABLE FAILURE
|
||||
OUTPUT_VARIABLE PRINT_OUTPUT
|
||||
)
|
||||
@@ -168,7 +165,7 @@ macro(SetupShibokenAndPyside)
|
||||
"================================\n")
|
||||
else()
|
||||
execute_process(
|
||||
COMMAND ${Python3_EXECUTABLE} -c "import PySide${PYSIDE_MAJOR_VERSION};print(PySide${PYSIDE_MAJOR_VERSION}.__version__, end='')"
|
||||
COMMAND ${PYTHON_EXECUTABLE} -c "import PySide${PYSIDE_MAJOR_VERSION};print(PySide${PYSIDE_MAJOR_VERSION}.__version__, end='')"
|
||||
RESULT_VARIABLE FAILURE
|
||||
OUTPUT_VARIABLE PySide_VERSION
|
||||
)
|
||||
@@ -178,6 +175,38 @@ macro(SetupShibokenAndPyside)
|
||||
endmacro(SetupShibokenAndPyside)
|
||||
|
||||
|
||||
# Macros similar to FindQt4.cmake's WRAP_UI and WRAP_RC, for the automatic generation of Python
|
||||
# code from Qt4's user interface ('.ui') and resource ('.qrc') files. These macros are called:
|
||||
# - PYSIDE_WRAP_UI
|
||||
# - PYSIDE_WRAP_RC
|
||||
|
||||
MACRO(PYSIDE_WRAP_UI outfiles)
|
||||
if (NOT PYSIDE_UIC_EXECUTABLE)
|
||||
message(FATAL_ERROR "Qt uic is required for generating ${ARGN}")
|
||||
endif()
|
||||
FOREACH(it ${ARGN})
|
||||
GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
|
||||
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
|
||||
SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.py)
|
||||
if(WIN32 OR APPLE)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${PYSIDE_UIC_EXECUTABLE} ${UICOPTIONS} ${infile} -o ${outfile}
|
||||
MAIN_DEPENDENCY ${infile}
|
||||
)
|
||||
else()
|
||||
# Especially on Open Build Service we don't want changing date like
|
||||
# pyside2-uic generates in comments at beginning., which is why
|
||||
# we follow the tool command with a POSIX-friendly sed.
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND "${PYSIDE_UIC_EXECUTABLE}" ${UICOPTIONS} "${infile}" -o "${outfile}"
|
||||
COMMAND sed "/^# /d" "${outfile}" >"${outfile}.tmp" && mv "${outfile}.tmp" "${outfile}"
|
||||
MAIN_DEPENDENCY "${infile}"
|
||||
)
|
||||
endif()
|
||||
list(APPEND ${outfiles} ${outfile})
|
||||
ENDFOREACH(it)
|
||||
ENDMACRO (PYSIDE_WRAP_UI)
|
||||
|
||||
MACRO(PYSIDE_WRAP_RC outfiles)
|
||||
if (NOT PYSIDE_RCC_EXECUTABLE)
|
||||
message(FATAL_ERROR "Qt rcc is required for generating ${ARGN}")
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
macro(SetupZipIos)
|
||||
# -------------------------------- ZipIos --------------------------------
|
||||
|
||||
# Use external zipios++ if specified.
|
||||
if(FREECAD_USE_EXTERNAL_ZIPIOS)
|
||||
find_library(ZIPIOS_LIBRARY zipios)
|
||||
find_path(ZIPIOS_INCLUDES zipios++/zipios-config.h)
|
||||
if(ZIPIOS_LIBRARY)
|
||||
message(STATUS "Found zipios++: ${ZIPIOS}")
|
||||
endif()
|
||||
if(ZIPIOS_INCLUDES)
|
||||
message(STATUS "Found zipios++ headers.")
|
||||
endif()
|
||||
if(NOT ZIPIOS_LIBRARY OR NOT ZIPIOS_INCLUDES)
|
||||
message(FATAL_ERROR "Using external zipios++ was specified but was not found.")
|
||||
endif()
|
||||
else(FREECAD_USE_EXTERNAL_ZIPIOS)
|
||||
set(ZIPIOS_INCLUDES ${CMAKE_SOURCE_DIR}/src/3rdParty)
|
||||
SET(zipios_SRCS
|
||||
${ZIPIOS_INCLUDES}/zipios++/backbuffer.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/collcoll.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/collcoll.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/deflateoutputstreambuf.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/deflateoutputstreambuf.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/fcoll.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/fcoll.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/fcollexceptions.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/fcollexceptions.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/fileentry.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/fileentry.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/filepath.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/filepath.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/filterinputstreambuf.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/filterinputstreambuf.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/filteroutputstreambuf.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/filteroutputstreambuf.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/gzipoutputstream.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/gzipoutputstream.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/gzipoutputstreambuf.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/gzipoutputstreambuf.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/inflateinputstreambuf.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/inflateinputstreambuf.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/meta-iostreams.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/outputstringstream.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/simplesmartptr.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/virtualseeker.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/zipfile.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/zipfile.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/ziphead.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/ziphead.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/zipheadio.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/zipheadio.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/zipinputstream.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/zipinputstream.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/zipinputstreambuf.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/zipinputstreambuf.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/zipios_common.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/zipios-config.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/zipios_defs.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/zipoutputstreambuf.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/zipoutputstreambuf.h
|
||||
${ZIPIOS_INCLUDES}/zipios++/zipoutputstream.cpp
|
||||
${ZIPIOS_INCLUDES}/zipios++/zipoutputstream.h
|
||||
)
|
||||
endif(FREECAD_USE_EXTERNAL_ZIPIOS)
|
||||
|
||||
endmacro(SetupZipIos)
|
||||
+69
-74
@@ -9,27 +9,21 @@ MACRO (fc_copy_sources target_name outpath)
|
||||
else()
|
||||
set(fc_details "")
|
||||
endif()
|
||||
if(INSTALL_PREFER_SYMLINKS)
|
||||
set(copy_command create_symlink)
|
||||
else()
|
||||
set(copy_command copy)
|
||||
endif()
|
||||
|
||||
foreach(it ${ARGN})
|
||||
get_filename_component(infile ${it} ABSOLUTE)
|
||||
get_filename_component(outfile "${outpath}/${it}" ABSOLUTE)
|
||||
# Ensure parent directory exists when copying or creating symlinks
|
||||
get_filename_component(outfile_dir "${outfile}" PATH)
|
||||
add_file_dependencies("${infile}" "${outfile}")
|
||||
ADD_CUSTOM_COMMAND(
|
||||
# Make sure destination directory exists before copy/symlink
|
||||
COMMAND "${CMAKE_COMMAND}" -E make_directory "${outfile_dir}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E ${copy_command} "${infile}" "${outfile}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy "${infile}" "${outfile}"
|
||||
OUTPUT "${outfile}"
|
||||
COMMENT "Copying ${infile} to ${outfile}${fc_details}"
|
||||
MAIN_DEPENDENCY "${infile}"
|
||||
)
|
||||
endforeach(it)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
TARGET ${target_name}
|
||||
DEPENDS ${ARGN}
|
||||
)
|
||||
ENDMACRO(fc_copy_sources)
|
||||
|
||||
MACRO (fc_copy_file_if_different inputfile outputfile)
|
||||
@@ -82,6 +76,10 @@ MACRO (fc_target_copy_resource target_name inpath outpath)
|
||||
MAIN_DEPENDENCY "${infile}"
|
||||
)
|
||||
endforeach(it)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
TARGET ${target_name}
|
||||
DEPENDS ${ARGN}
|
||||
)
|
||||
ENDMACRO(fc_target_copy_resource)
|
||||
|
||||
MACRO (fc_target_copy_resource_flat target_name inpath outpath)
|
||||
@@ -113,13 +111,16 @@ MACRO (fc_target_copy_resource_flat target_name inpath outpath)
|
||||
MAIN_DEPENDENCY "${infile}"
|
||||
)
|
||||
endforeach(it)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
TARGET ${target_name}
|
||||
DEPENDS ${ARGN}
|
||||
)
|
||||
ENDMACRO(fc_target_copy_resource_flat)
|
||||
|
||||
# It would be a bit cleaner to generate these files in ${CMAKE_CURRENT_BINARY_DIR}
|
||||
|
||||
# To be removed once all instances are migrated to generate_from_py
|
||||
macro(generate_from_xml BASE_NAME)
|
||||
set(TOOL_PATH "${CMAKE_SOURCE_DIR}/src/Tools/bindings/generate.py")
|
||||
set(TOOL_PATH "${CMAKE_SOURCE_DIR}/src/Tools/generate.py")
|
||||
file(TO_NATIVE_PATH "${TOOL_PATH}" TOOL_NATIVE_PATH)
|
||||
file(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${BASE_NAME}.xml" SOURCE_NATIVE_PATH)
|
||||
|
||||
@@ -131,75 +132,34 @@ macro(generate_from_xml BASE_NAME)
|
||||
if(NOT EXISTS "${SOURCE_CPP_PATH}")
|
||||
# assures the source files are generated at least once
|
||||
message(STATUS "${SOURCE_CPP_PATH}")
|
||||
execute_process(COMMAND "${Python3_EXECUTABLE}" "${TOOL_NATIVE_PATH}" --outputPath "${OUTPUT_NATIVE_PATH}" "${SOURCE_NATIVE_PATH}"
|
||||
execute_process(COMMAND "${PYTHON_EXECUTABLE}" "${TOOL_NATIVE_PATH}" --outputPath "${OUTPUT_NATIVE_PATH}" "${SOURCE_NATIVE_PATH}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
)
|
||||
endif()
|
||||
add_custom_command(
|
||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${BASE_NAME}.h" "${CMAKE_CURRENT_BINARY_DIR}/${BASE_NAME}.cpp"
|
||||
COMMAND ${Python3_EXECUTABLE} "${TOOL_NATIVE_PATH}" --outputPath "${OUTPUT_NATIVE_PATH}" ${BASE_NAME}.xml
|
||||
MAIN_DEPENDENCY "${CMAKE_CURRENT_SOURCE_DIR}/${BASE_NAME}.xml"
|
||||
COMMAND ${PYTHON_EXECUTABLE} "${TOOL_NATIVE_PATH}" --outputPath "${OUTPUT_NATIVE_PATH}" ${BASE_NAME}.xml
|
||||
MAIN_DEPENDENCY "${BASE_NAME}.xml"
|
||||
DEPENDS
|
||||
"${CMAKE_SOURCE_DIR}/src/Tools/bindings/templates/templateClassPyExport.py"
|
||||
"${CMAKE_SOURCE_DIR}/src/Tools/generateTemplates/templateClassPyExport.py"
|
||||
"${TOOL_PATH}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
COMMENT "Building ${BASE_NAME}.h/.cpp out of ${BASE_NAME}.xml"
|
||||
)
|
||||
endmacro(generate_from_xml)
|
||||
|
||||
macro(generate_from_py_impl BASE_NAME SUFFIX)
|
||||
set(TOOL_PATH "${CMAKE_SOURCE_DIR}/src/Tools/bindings/generate.py")
|
||||
file(TO_NATIVE_PATH "${TOOL_PATH}" TOOL_NATIVE_PATH)
|
||||
file(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${BASE_NAME}.pyi" SOURCE_NATIVE_PATH)
|
||||
|
||||
set(SOURCE_CPP_PATH "${CMAKE_CURRENT_BINARY_DIR}/${BASE_NAME}Py${SUFFIX}.cpp")
|
||||
set(SOURCE_H_PATH "${CMAKE_CURRENT_BINARY_DIR}/${BASE_NAME}Py${SUFFIX}.h")
|
||||
|
||||
# BASE_NAME may include also a path name
|
||||
GET_FILENAME_COMPONENT(OUTPUT_PATH "${SOURCE_CPP_PATH}" PATH)
|
||||
file(TO_NATIVE_PATH "${OUTPUT_PATH}" OUTPUT_NATIVE_PATH)
|
||||
if(NOT EXISTS "${SOURCE_CPP_PATH}")
|
||||
# Ensure the source files are generated at least once.
|
||||
message(STATUS "${SOURCE_CPP_PATH}")
|
||||
execute_process(
|
||||
COMMAND "${Python3_EXECUTABLE}" "${TOOL_NATIVE_PATH}" --outputPath "${OUTPUT_NATIVE_PATH}" "${SOURCE_NATIVE_PATH}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
COMMAND_ERROR_IS_FATAL ANY
|
||||
)
|
||||
endif()
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "${SOURCE_H_PATH}" "${SOURCE_CPP_PATH}"
|
||||
COMMAND ${Python3_EXECUTABLE} "${TOOL_NATIVE_PATH}" --outputPath "${OUTPUT_NATIVE_PATH}" ${BASE_NAME}.pyi
|
||||
MAIN_DEPENDENCY "${CMAKE_CURRENT_SOURCE_DIR}/${BASE_NAME}.pyi"
|
||||
DEPENDS
|
||||
"${CMAKE_SOURCE_DIR}/src/Tools/bindings/templates/templateClassPyExport.py"
|
||||
"${TOOL_PATH}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
COMMENT "Building ${BASE_NAME}Py${SUFFIX}.h/.cpp out of ${BASE_NAME}.pyi"
|
||||
)
|
||||
endmacro(generate_from_py_impl)
|
||||
|
||||
macro(generate_from_py BASE_NAME)
|
||||
generate_from_py_impl(${BASE_NAME} "")
|
||||
endmacro(generate_from_py)
|
||||
|
||||
macro(generate_from_py_ BASE_NAME)
|
||||
generate_from_py_impl(${BASE_NAME} "_")
|
||||
endmacro(generate_from_py_)
|
||||
|
||||
macro(generate_embed_from_py BASE_NAME OUTPUT_FILE)
|
||||
macro(generate_from_py BASE_NAME OUTPUT_FILE)
|
||||
set(TOOL_PATH "${CMAKE_SOURCE_DIR}/src/Tools/PythonToCPP.py")
|
||||
file(TO_NATIVE_PATH "${TOOL_PATH}" TOOL_NATIVE_PATH)
|
||||
file(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${BASE_NAME}.py" SOURCE_NATIVE_PATH)
|
||||
add_custom_command(
|
||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE}"
|
||||
COMMAND "${Python3_EXECUTABLE}" "${TOOL_NATIVE_PATH}" "${SOURCE_NATIVE_PATH}" "${OUTPUT_FILE}"
|
||||
COMMAND "${PYTHON_EXECUTABLE}" "${TOOL_NATIVE_PATH}" "${SOURCE_NATIVE_PATH}" "${OUTPUT_FILE}"
|
||||
MAIN_DEPENDENCY "${CMAKE_CURRENT_SOURCE_DIR}/${BASE_NAME}.py"
|
||||
DEPENDS "${TOOL_PATH}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
COMMENT "Building files out of ${BASE_NAME}.py")
|
||||
endmacro(generate_embed_from_py)
|
||||
endmacro(generate_from_py)
|
||||
|
||||
macro(generate_from_any INPUT_FILE OUTPUT_FILE VARIABLE)
|
||||
set(TOOL_PATH "${CMAKE_SOURCE_DIR}/src/Tools/PythonToCPP.py")
|
||||
@@ -207,7 +167,7 @@ macro(generate_from_any INPUT_FILE OUTPUT_FILE VARIABLE)
|
||||
file(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${INPUT_FILE}" SOURCE_NATIVE_PATH)
|
||||
add_custom_command(
|
||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE}"
|
||||
COMMAND "${Python3_EXECUTABLE}" "${TOOL_NATIVE_PATH}" "${SOURCE_NATIVE_PATH}" "${OUTPUT_FILE}" "${VARIABLE}"
|
||||
COMMAND "${PYTHON_EXECUTABLE}" "${TOOL_NATIVE_PATH}" "${SOURCE_NATIVE_PATH}" "${OUTPUT_FILE}" "${VARIABLE}"
|
||||
MAIN_DEPENDENCY "${CMAKE_CURRENT_SOURCE_DIR}/${INPUT_FILE}"
|
||||
DEPENDS "${TOOL_PATH}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
@@ -215,6 +175,47 @@ macro(generate_from_any INPUT_FILE OUTPUT_FILE VARIABLE)
|
||||
endmacro(generate_from_any)
|
||||
|
||||
|
||||
|
||||
MACRO(ADD_MSVC_PRECOMPILED_HEADER TargetName PrecompiledHeader PrecompiledSource SourcesVar)
|
||||
IF(MSVC)
|
||||
GET_FILENAME_COMPONENT(PrecompiledBasename ${PrecompiledHeader} NAME_WE)
|
||||
IF(MSVC_IDE)
|
||||
SET(PrecompiledBinary "$(IntDir)\\$(TargetName).pch")
|
||||
ELSE(MSVC_IDE)
|
||||
SET(PrecompiledBinary ${CMAKE_CURRENT_BINARY_DIR}/${TargetName}.pch)
|
||||
ENDIF(MSVC_IDE)
|
||||
SET(Sources ${${SourcesVar}})
|
||||
|
||||
SET_SOURCE_FILES_PROPERTIES(${PrecompiledSource}
|
||||
PROPERTIES COMPILE_FLAGS "/Yc\"${PrecompiledHeader}\" /Fp\"${PrecompiledBinary}\""
|
||||
OBJECT_OUTPUTS "${PrecompiledBinary}")
|
||||
SET_SOURCE_FILES_PROPERTIES(${Sources}
|
||||
PROPERTIES COMPILE_FLAGS "/Yu\"${PrecompiledHeader}\" /FI\"${PrecompiledBinary}\" /Fp\"${PrecompiledBinary}\""
|
||||
OBJECT_DEPENDS "${PrecompiledBinary}")
|
||||
# Add precompiled header to SourcesVar
|
||||
LIST(APPEND ${SourcesVar} ${PrecompiledSource})
|
||||
ENDIF(MSVC)
|
||||
ENDMACRO(ADD_MSVC_PRECOMPILED_HEADER)
|
||||
|
||||
MACRO(GET_MSVC_PRECOMPILED_SOURCE PrecompiledSource SourcesVar)
|
||||
IF(MSVC)
|
||||
FOREACH (it ${ARGN})
|
||||
GET_FILENAME_COMPONENT(file_ext ${it} EXT)
|
||||
GET_FILENAME_COMPONENT(file_name ${it} NAME)
|
||||
STRING(COMPARE EQUAL ${it} ${PrecompiledSource} pch)
|
||||
IF (NOT pch)
|
||||
# get c++ source files
|
||||
STRING(REGEX MATCH "^(.cpp|.cc|.cxx)$" cpp_file ${file_ext})
|
||||
# ignore any generated source files from Qt
|
||||
STRING(REGEX MATCH "^(moc_|qrc_|ui_)" gen_file ${file_name})
|
||||
IF(cpp_file AND NOT gen_file)
|
||||
LIST(APPEND ${SourcesVar} ${it})
|
||||
ENDIF(cpp_file AND NOT gen_file)
|
||||
ENDIF(NOT pch)
|
||||
ENDFOREACH (it)
|
||||
ENDIF(MSVC)
|
||||
ENDMACRO(GET_MSVC_PRECOMPILED_SOURCE)
|
||||
|
||||
# Macro to replace all the binary output locations. Takes 2 optional parameters.
|
||||
# ${ARGVN} is zero based so the 3rd element is ${ARGV2}. When the 3rd element is missing,
|
||||
# Runtime and Lib directories default to /bin and /lib. When present, the 3rd element
|
||||
@@ -271,10 +272,8 @@ ENDMACRO(SET_PYTHON_PREFIX_SUFFIX)
|
||||
# Locate the include directory for a pip-installed package -- uses pip show to find the base pip
|
||||
# install directory, and then appends the package name and "/include" to the end
|
||||
macro(find_pip_package PACKAGE)
|
||||
unset(${PACKAGE}_FOUND) # Remove from local scope
|
||||
unset(${PACKAGE}_FOUND CACHE) # Remove from CMake cache (if it exists)
|
||||
execute_process(
|
||||
COMMAND ${Python3_EXECUTABLE} -m pip show ${PACKAGE}
|
||||
COMMAND ${PYTHON_EXECUTABLE} -m pip show ${PACKAGE}
|
||||
RESULT_VARIABLE FAILURE
|
||||
OUTPUT_VARIABLE PRINT_OUTPUT
|
||||
)
|
||||
@@ -307,18 +306,15 @@ macro(find_pip_package PACKAGE)
|
||||
file(GLOB OPT_LIBRARIES "${PIP_PACKAGE_LOCATION}/${PIP_PACKAGE_NAME}/*${PIP_LIB_NAME}*.so.*")
|
||||
endif()
|
||||
if (OPT_LIBRARIES AND DEBUG_LIBRARIES)
|
||||
set(${PACKAGE}_LIBRARIES optimized ${OPT_LIBRARIES} debug ${DEBUG_LIBRARIES} CACHE PATH "Location of the ${PACKAGE} libraries")
|
||||
set(${PACKAGE}_LIBRARIES optimized ${OPT_LIBRARIES} debug ${DEBUG_LIBRARIES} CACHE PATH "")
|
||||
elseif(OPT_LIBRARIES)
|
||||
set(${PACKAGE}_LIBRARIES ${OPT_LIBRARIES} CACHE PATH "Location of the ${PACKAGE} optimized libraries")
|
||||
set(${PACKAGE}_LIBRARIES ${OPT_LIBRARIES} CACHE PATH "")
|
||||
elseif(DEBUG_LIBRARIES)
|
||||
set(${PACKAGE}_LIBRARIES ${DEBUG_LIBRARIES} CACHE PATH "Location of the ${PACKAGE} debug libraries")
|
||||
set(${PACKAGE}_LIBRARIES ${DEBUG_LIBRARIES} CACHE PATH "")
|
||||
endif()
|
||||
set(${PACKAGE}_INCLUDE_DIRS ${INCLUDE_DIR} CACHE PATH "Location of the ${PACKAGE} includes")
|
||||
set(${PACKAGE}_FOUND ON)
|
||||
set(${PACKAGE}_INCLUDE_DIRS ${INCLUDE_DIR} CACHE PATH "")
|
||||
set(${PACKAGE}_FOUND ON CACHE BOOL OFF)
|
||||
message(STATUS "Found pip-installed ${PACKAGE} in ${PIP_PACKAGE_LOCATION}/${PIP_PACKAGE_NAME}")
|
||||
if(${PACKAGE}_INCLUDE_DIRS)
|
||||
message(STATUS " --> with includes in ${${PACKAGE}_INCLUDE_DIRS}")
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
@@ -327,4 +323,3 @@ function(target_compile_warn_error ProjectName)
|
||||
target_compile_options(${ProjectName} PRIVATE -Werror)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
|
||||
+1
-11
@@ -19,25 +19,15 @@ if(FREECAD_LIBPACK_VERSION VERSION_GREATER_EQUAL "3.1.0")
|
||||
find_package(pybind11 REQUIRED PATHS ${FREECAD_LIBPACK_DIR}/share/cmake/pybind11 NO_DEFAULT_PATH)
|
||||
message(STATUS "Found LibPack 3 pybind11 ${pybind11_VERSION}")
|
||||
set(FREECAD_USE_PYBIND11 ON)
|
||||
else()
|
||||
# We have completely removed support for boost-python and require pybind11, which requires LibPack 3.1 or later
|
||||
message(FATAL_ERROR "FreeCAD now requires LibPack 3.1.0 or newer (you are using ${FREECAD_LIBPACK_VERSION}): please upgrade your LibPack")
|
||||
endif()
|
||||
|
||||
find_package(XercesC REQUIRED PATHS ${FREECAD_LIBPACK_DIR}/cmake NO_DEFAULT_PATH)
|
||||
message(STATUS "Found LibPack 3 XercesC ${XercesC_VERSION}")
|
||||
|
||||
if(FREECAD_LIBPACK_VERSION VERSION_GREATER_EQUAL "3.1.1")
|
||||
set(FREECAD_USE_EXTERNAL_E57FORMAT ON)
|
||||
find_package(E57Format REQUIRED PATHS ${FREECAD_LIBPACK_DIR}/lib/cmake/e57format NO_DEFAULT_PATH)
|
||||
message(STATUS "Found LibPack 3 e57format ${e57format_VERSION}")
|
||||
endif()
|
||||
|
||||
find_package(yaml-cpp REQUIRED PATHS ${FREECAD_LIBPACK_DIR}/lib/cmake NO_DEFAULT_PATH)
|
||||
message(STATUS "Found LibPack 3 yaml-cpp ${yaml-cpp_VERSION}")
|
||||
message(STATUS "Found LibPack 3 yaml-cpp ${XercesC_VERSION}")
|
||||
|
||||
find_package(Coin REQUIRED PATHS ${FREECAD_LIBPACK_DIR}/lib/cmake NO_DEFAULT_PATH)
|
||||
|
||||
message(STATUS "Found LibPack 3 Coin ${Coin_VERSION}")
|
||||
# For compatibility with the rest of the cMake scripts:
|
||||
set (COIN3D_FOUND TRUE)
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
mamba run --live-stream -n freecad cmake %*
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
mamba run --live-stream -n freecad cmake $@
|
||||
@@ -0,0 +1,9 @@
|
||||
name: freecad
|
||||
channels:
|
||||
- conda-forge
|
||||
dependencies:
|
||||
- conda-forge/noarch::conda-libmamba-solver==24.7.0
|
||||
- conda-devenv
|
||||
- mamba
|
||||
- python==3.12.*
|
||||
- zstd
|
||||
@@ -0,0 +1,9 @@
|
||||
name: freecad
|
||||
channels:
|
||||
- conda-forge
|
||||
dependencies:
|
||||
- conda-forge/noarch::conda-libmamba-solver==24.7.0
|
||||
- conda-devenv
|
||||
- mamba
|
||||
- python==3.11.*
|
||||
- zstd==1.5.6
|
||||
@@ -0,0 +1,100 @@
|
||||
name: freecad
|
||||
channels:
|
||||
- conda-forge
|
||||
- conda-forge/label/pivy_rc
|
||||
dependencies:
|
||||
- conda-forge/noarch::conda-libmamba-solver==24.7.0
|
||||
- libspnav # [linux]
|
||||
- kernel-headers_linux-64 # [linux and x86_64]
|
||||
- libdrm-cos7-x86_64 # [linux and x86_64]
|
||||
- libselinux-cos7-x86_64 # [linux and x86_64]
|
||||
- libsepol-cos7-x86_64 # [linux and x86_64]
|
||||
- libx11-common-cos7-x86_64 # [linux and x86_64]
|
||||
- libx11-cos7-x86_64 # [linux and x86_64]
|
||||
- libxau-cos7-x86_64 # [linux and x86_64]
|
||||
- libxcb-cos7-x86_64 # [linux and x86_64]
|
||||
- libxdamage-cos7-x86_64 # [linux and x86_64]
|
||||
- libxext-cos7-x86_64 # [linux and x86_64]
|
||||
- libxfixes-cos7-x86_64 # [linux and x86_64]
|
||||
- libxi-cos7-x86_64 # [linux and x86_64]
|
||||
- libxi-devel-cos7-x86_64 # [linux and x86_64]
|
||||
- libxxf86vm-cos7-x86_64 # [linux and x86_64]
|
||||
- mesa-dri-drivers-cos7-x86_64 # [linux and x86_64]
|
||||
- mesa-libegl-cos7-x86_64 # [linux and x86_64]
|
||||
- mesa-libegl-devel-cos7-x86_64 # [linux and x86_64]
|
||||
- mesa-libgl-cos7-x86_64 # [linux and x86_64]
|
||||
- mesa-libgl-devel-cos7-x86_64 # [linux and x86_64]
|
||||
- pixman-cos7-x86_64 # [linux and x86_64]
|
||||
- sysroot_linux-64 # [linux and x86_64]
|
||||
- xorg-x11-server-common-cos7-x86_64 # [linux and x86_64]
|
||||
- xorg-x11-server-xvfb-cos7-x86_64 # [linux and x86_64]
|
||||
- kernel-headers_linux-aarch64 # [linux and aarch64]
|
||||
- libdrm-cos7-aarch64 # [linux and aarch64]
|
||||
- libglvnd-cos7-aarch64 # [linux and aarch64]
|
||||
- libglvnd-glx-cos7-aarch64 # [linux and aarch64]
|
||||
- libselinux-cos7-aarch64 # [linux and aarch64]
|
||||
- libsepol-cos7-aarch64 # [linux and aarch64]
|
||||
- libx11-common-cos7-aarch64 # [linux and aarch64]
|
||||
- libx11-cos7-aarch64 # [linux and aarch64]
|
||||
- libxau-cos7-aarch64 # [linux and aarch64]
|
||||
- libxcb-cos7-aarch64 # [linux and aarch64]
|
||||
- libxdamage-cos7-aarch64 # [linux and aarch64]
|
||||
- libxext-cos7-aarch64 # [linux and aarch64]
|
||||
- libxfixes-cos7-aarch64 # [linux and aarch64]
|
||||
- libxi-cos7-aarch64 # [linux and aarch64]
|
||||
- libxi-devel-cos7-aarch64 # [linux and aarch64]
|
||||
- libxxf86vm-cos7-aarch64 # [linux and aarch64]
|
||||
- mesa-dri-drivers-cos7-aarch64 # [linux and aarch64]
|
||||
- mesa-khr-devel-cos7-aarch64 # [linux and aarch64]
|
||||
- mesa-libegl-cos7-aarch64 # [linux and aarch64]
|
||||
- mesa-libegl-devel-cos7-aarch64 # [linux and aarch64]
|
||||
- mesa-libgbm-cos7-aarch64 # [linux and aarch64]
|
||||
- mesa-libgl-cos7-aarch64 # [linux and aarch64]
|
||||
- mesa-libgl-devel-cos7-aarch64 # [linux and aarch64]
|
||||
- mesa-libglapi-cos7-aarch64 # [linux and aarch64]
|
||||
- pixman-cos7-aarch64 # [linux and aarch64]
|
||||
- sysroot_linux-aarch64 # [linux and aarch64]
|
||||
- xorg-x11-server-common-cos7-aarch64 # [linux and aarch64]
|
||||
- xorg-x11-server-xvfb-cos7-aarch64 # [linux and aarch64]
|
||||
- sed # [unix]
|
||||
- ccache
|
||||
- cmake
|
||||
- coin3d
|
||||
- compilers
|
||||
- conda
|
||||
- conda-devenv
|
||||
- debugpy
|
||||
- doxygen
|
||||
- eigen
|
||||
- fmt
|
||||
- freetype
|
||||
- git
|
||||
- gmsh
|
||||
- graphviz
|
||||
- hdf5
|
||||
- libboost-devel
|
||||
- libcxx
|
||||
- mamba
|
||||
- matplotlib
|
||||
- ninja
|
||||
- numpy
|
||||
- occt
|
||||
- openssl
|
||||
- pcl
|
||||
- pip
|
||||
- conda-forge/label/pivy_rc::pivy
|
||||
- pkg-config
|
||||
- ply
|
||||
- pre-commit
|
||||
- pybind11
|
||||
- pyside6
|
||||
- python==3.12.*
|
||||
- pyyaml
|
||||
- qt6-main
|
||||
- smesh
|
||||
- swig
|
||||
- vtk==9.2.6
|
||||
- xerces-c
|
||||
- yaml-cpp
|
||||
- zlib
|
||||
- zstd
|
||||
@@ -0,0 +1,103 @@
|
||||
name: freecad
|
||||
channels:
|
||||
- conda-forge
|
||||
dependencies:
|
||||
- conda-forge/noarch::conda-libmamba-solver==24.7.0
|
||||
- libspnav # [linux]
|
||||
- kernel-headers_linux-64 # [linux and x86_64]
|
||||
- libdrm-conda-x86_64 # [linux and x86_64]
|
||||
- libselinux-conda-x86_64 # [linux and x86_64]
|
||||
- libsepol-conda-x86_64 # [linux and x86_64]
|
||||
- libx11-common-conda-x86_64 # [linux and x86_64]
|
||||
- libx11-conda-x86_64 # [linux and x86_64]
|
||||
- libxau-conda-x86_64 # [linux and x86_64]
|
||||
- libxcb-conda-x86_64 # [linux and x86_64]
|
||||
- libxdamage-conda-x86_64 # [linux and x86_64]
|
||||
- libxext-conda-x86_64 # [linux and x86_64]
|
||||
- libxfixes-conda-x86_64 # [linux and x86_64]
|
||||
- libxi-conda-x86_64 # [linux and x86_64]
|
||||
- libxi-devel-conda-x86_64 # [linux and x86_64]
|
||||
- libxxf86vm-conda-x86_64 # [linux and x86_64]
|
||||
- mesa-dri-drivers-conda-x86_64 # [linux and x86_64]
|
||||
- mesa-libegl-conda-x86_64 # [linux and x86_64]
|
||||
- mesa-libegl-devel-conda-x86_64 # [linux and x86_64]
|
||||
- mesa-libgl-conda-x86_64 # [linux and x86_64]
|
||||
- mesa-libgl-devel-conda-x86_64 # [linux and x86_64]
|
||||
- pixman-conda-x86_64 # [linux and x86_64]
|
||||
- sysroot_linux-64 # [linux and x86_64]
|
||||
- xorg-x11-server-common-conda-x86_64 # [linux and x86_64]
|
||||
- xorg-x11-server-xvfb-conda-x86_64 # [linux and x86_64]
|
||||
- kernel-headers_linux-aarch64 # [linux and aarch64]
|
||||
- libdrm-conda-aarch64 # [linux and aarch64]
|
||||
- libglvnd-conda-aarch64 # [linux and aarch64]
|
||||
- libglvnd-glx-conda-aarch64 # [linux and aarch64]
|
||||
- libselinux-conda-aarch64 # [linux and aarch64]
|
||||
- libsepol-conda-aarch64 # [linux and aarch64]
|
||||
- libx11-common-conda-aarch64 # [linux and aarch64]
|
||||
- libx11-conda-aarch64 # [linux and aarch64]
|
||||
- libxau-conda-aarch64 # [linux and aarch64]
|
||||
- libxcb-conda-aarch64 # [linux and aarch64]
|
||||
- libxdamage-conda-aarch64 # [linux and aarch64]
|
||||
- libxext-conda-aarch64 # [linux and aarch64]
|
||||
- libxfixes-conda-aarch64 # [linux and aarch64]
|
||||
- libxi-conda-aarch64 # [linux and aarch64]
|
||||
- libxi-devel-conda-aarch64 # [linux and aarch64]
|
||||
- libxxf86vm-conda-aarch64 # [linux and aarch64]
|
||||
- mesa-dri-drivers-conda-aarch64 # [linux and aarch64]
|
||||
- mesa-khr-devel-conda-aarch64 # [linux and aarch64]
|
||||
- mesa-libegl-conda-aarch64 # [linux and aarch64]
|
||||
- mesa-libegl-devel-conda-aarch64 # [linux and aarch64]
|
||||
- mesa-libgbm-conda-aarch64 # [linux and aarch64]
|
||||
- mesa-libgl-conda-aarch64 # [linux and aarch64]
|
||||
- mesa-libgl-devel-conda-aarch64 # [linux and aarch64]
|
||||
- mesa-libglapi-conda-aarch64 # [linux and aarch64]
|
||||
- pixman-conda-aarch64 # [linux and aarch64]
|
||||
- sysroot_linux-aarch64 # [linux and aarch64]
|
||||
- xorg-x11-server-common-conda-aarch64 # [linux and aarch64]
|
||||
- xorg-x11-server-xvfb-conda-aarch64 # [linux and aarch64]
|
||||
- sed # [unix]
|
||||
- ccache
|
||||
- cmake
|
||||
- coin3d
|
||||
- compilers
|
||||
- gcc==13.3.* # [linux]
|
||||
- gxx==13.3.* # [linux]
|
||||
- clang==18.1.* # [osx]
|
||||
- clangxx==18.1.* # [osx]
|
||||
- conda
|
||||
- conda-devenv
|
||||
- debugpy
|
||||
- doxygen
|
||||
- eigen
|
||||
- fmt
|
||||
- freetype
|
||||
- git
|
||||
- gmsh
|
||||
- graphviz
|
||||
- hdf5
|
||||
- libboost-devel
|
||||
- libcxx
|
||||
- mamba
|
||||
- matplotlib
|
||||
- ninja
|
||||
- numpy
|
||||
- occt
|
||||
- openssl
|
||||
- pcl
|
||||
- pip
|
||||
- pivy
|
||||
- pkg-config
|
||||
- ply
|
||||
- pre-commit
|
||||
- pybind11
|
||||
- pyside2
|
||||
- python==3.11.*
|
||||
- pyyaml
|
||||
- qt-main
|
||||
- smesh
|
||||
- swig
|
||||
- vtk==9.2.6
|
||||
- xerces-c
|
||||
- yaml-cpp
|
||||
- zlib
|
||||
- zstd
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
# create the conda environment as a subdirectory
|
||||
mamba env create -p .conda/freecad -f conda/conda-env.yaml
|
||||
|
||||
# add the environment subdirectory to the conda configuration
|
||||
conda config --add envs_dirs $CONDA_PREFIX/envs
|
||||
conda config --add envs_dirs $(pwd)/.conda
|
||||
conda config --set env_prompt "({name})"
|
||||
|
||||
# install the FreeCAD dependencies into the environment
|
||||
mamba run --live-stream -n freecad mamba-devenv --no-prune -f conda/environment-qt6.devenv.yml
|
||||
@@ -0,0 +1,10 @@
|
||||
:: create the conda environment as a subdirectory
|
||||
call mamba env create -p .conda/freecad -f conda/conda-env.yaml
|
||||
|
||||
:: add the environment subdirectory to the conda configuration
|
||||
call conda config --add envs_dirs %CONDA_PREFIX%/envs
|
||||
call conda config --add envs_dirs %CD%/.conda
|
||||
call conda config --set env_prompt "({name})"
|
||||
|
||||
:: install the FreeCAD dependencies into the environment
|
||||
call mamba run --live-stream -n freecad mamba-devenv --no-prune -f conda/environment.devenv.yml
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
# create the conda environment as a subdirectory
|
||||
mamba env create -p .conda/freecad -f conda/conda-env.yaml
|
||||
|
||||
# add the environment subdirectory to the conda configuration
|
||||
conda config --add envs_dirs $CONDA_PREFIX/envs
|
||||
conda config --add envs_dirs $(pwd)/.conda
|
||||
conda config --set env_prompt "({name})"
|
||||
|
||||
# install the FreeCAD dependencies into the environment
|
||||
mamba run --live-stream -n freecad mamba-devenv --no-prune -f conda/environment.devenv.yml
|
||||
Vendored
+7
-47
@@ -16,30 +16,10 @@
|
||||
],
|
||||
"linux": {
|
||||
"MIMode": "gdb",
|
||||
"miDebuggerPath": "/usr/bin/gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Load QT pretty-printers for GDB",
|
||||
"text": "python import sys; sys.path.append('${workspaceFolder}/contrib/debugger'); from qt_pretty_printers_gdb import register_qt_printers; register_qt_printers()",
|
||||
"ignoreFailures": false
|
||||
},
|
||||
{
|
||||
"description": "Enable pretty-printing for GDB",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "Set Disassembly Flavor to Intel",
|
||||
"text": "-gdb-set disassembly-flavor intel",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
"miDebuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"osx": {
|
||||
"MIMode": "lldb",
|
||||
"preRunCommands": [
|
||||
"command script import ${workspaceFolder}/contrib/debugger/qt_pretty_printers_lldb.py"
|
||||
]
|
||||
"MIMode": "lldb"
|
||||
},
|
||||
"stopAtEntry": false,
|
||||
"externalConsole": false,
|
||||
@@ -67,30 +47,10 @@
|
||||
],
|
||||
"linux": {
|
||||
"MIMode": "gdb",
|
||||
"miDebuggerPath": "/usr/bin/gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Load QT pretty-printers for GDB",
|
||||
"text": "python import sys; sys.path.append('${workspaceFolder}/contrib/debugger'); from qt_pretty_printers_gdb import register_qt_printers; register_qt_printers()",
|
||||
"ignoreFailures": false
|
||||
},
|
||||
{
|
||||
"description": "Enable pretty-printing for GDB",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "Set Disassembly Flavor to Intel",
|
||||
"text": "-gdb-set disassembly-flavor intel",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
"miDebuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"osx": {
|
||||
"MIMode": "lldb",
|
||||
"preRunCommands": [
|
||||
"command script import ${workspaceFolder}/contrib/debugger/qt_pretty_printers_lldb.py"
|
||||
]
|
||||
"MIMode": "lldb"
|
||||
},
|
||||
"stopAtEntry": false,
|
||||
"externalConsole": false,
|
||||
@@ -100,13 +60,13 @@
|
||||
},
|
||||
{
|
||||
"name": "Python debugger",
|
||||
"type": "debugpy",
|
||||
"type": "python",
|
||||
"request": "attach",
|
||||
"preLaunchTask": "WaitForDebugpy",
|
||||
"redirectOutput": true,
|
||||
"connect": {
|
||||
"host": "localhost",
|
||||
"port": 5679
|
||||
"port": 5678
|
||||
},
|
||||
"pathMappings": [
|
||||
{
|
||||
@@ -131,4 +91,4 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
+1
-5
@@ -7,11 +7,7 @@ from freecad.utils import get_python_exe
|
||||
# By default it attempts to use Freecad's PID mistaking it for python.
|
||||
# https://github.com/microsoft/debugpy/issues/262
|
||||
debugpy.configure(python=get_python_exe())
|
||||
# As of Python 3.12, debugpy runs a forwarding process that listens both on the port specified here for the debugger
|
||||
# to connect to, but also on an internal port for the underlying pydevd within the python process to connect to. The
|
||||
# default for that internal port is 5678, so we need to not duplicate it for the external port. Also, on Linux the
|
||||
# attempt to spawn the forwarding process separately fails, so we force it to be internal to our main process.
|
||||
debugpy.listen(('localhost', 5679),in_process_debug_adapter=True)
|
||||
debugpy.listen(('localhost', 5678))
|
||||
|
||||
# Turns out you cannot probe debugpy to see if it is up:
|
||||
# https://github.com/microsoft/debugpy/issues/974
|
||||
|
||||
+2
-2
@@ -13,8 +13,8 @@ def check_socket(host, port):
|
||||
return sock.connect_ex((host, port)) == 0
|
||||
|
||||
def main():
|
||||
# DO NOT CHECK the actual port 5678/5879 or debugpy will break
|
||||
# Check that the other port 39999 used as a flag is manually opened instead
|
||||
# DO NOT CHECK 5678 or debugpy will break
|
||||
# Check other port manually opened instead
|
||||
attempt_counter = 0
|
||||
while (not check_socket('localhost', 39999)) and attempt_counter < MAX_ATTEMPTS:
|
||||
time.sleep(RETRY_DELAY_S)
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
import pydevd
|
||||
from multiprocessing.connection import Listener
|
||||
|
||||
print("CLion debugger macro running. Starting listener to get port")
|
||||
listen = Listener(('localhost', 39998), backlog=1)
|
||||
link = listen.accept()
|
||||
port = link.recv()
|
||||
link.close()
|
||||
listen.close()
|
||||
print("Port", port, "received, starting debugger. Check CLion to see if a breakpoint has been hit and continue")
|
||||
pydevd.settrace(port=port)
|
||||
print("Debugger operating, leaving macro.")
|
||||
@@ -1,18 +0,0 @@
|
||||
--- attach_pydevd.py.orig 2024-09-26 10:36:47.131066345 -0400
|
||||
+++ attach_pydevd.py 2024-09-26 10:16:48.687714133 -0400
|
||||
@@ -48,6 +48,15 @@
|
||||
import add_code_to_python_process
|
||||
show_debug_info_on_target_process = 0
|
||||
|
||||
+ print("attach_pydevd is trying to relay the port",setup['port'])
|
||||
+ try:
|
||||
+ from multiprocessing.connection import Client
|
||||
+ link = Client(('localhost',39998))
|
||||
+ link.send(setup['port'])
|
||||
+ link.close()
|
||||
+ except ConnectionError as ce:
|
||||
+ pass
|
||||
+
|
||||
pydevd_dirname = os.path.dirname(os.path.dirname(__file__))
|
||||
|
||||
if sys.platform == 'win32':
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user